A demo using parasolid to test its SSI, evaluation and other functions.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.6 KiB

2 years ago
cmake_minimum_required(VERSION 3.16)
project(ParasolidDemo LANGUAGES CXX C)
SET(CMAKE_CXX_STANDARD 14)
SET(PARASOLID "/mnt/d/download/parasolid/Parasolid_Installer_v350_rv1000/parasolid/intel_linux/base")
SET(SOURCE_DIR ${CMAKE_SOURCE_DIR})
CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/config/config.hpp.in" "${CMAKE_SOURCE_DIR}/config/config.hpp")
# 编译选项
#SET(CMAKE_CXX_FLAGS -DBOOST_NO_CXX11_SCOPED_ENUMS -lboost_filesystem)
#add_compile_options( -DBOOST_NO_CXX11_SCOPED_ENUMS -lboost_filesystem)
# 链接选项
# 来自parasolid_link.com
SET(LINK_FLAGS "-lm -pthread")
SET(CMAKE_SHARED_LINKER_FLAGS "${LINK_FLAGS}")
SET(CMAKE_EXE_LINKER_FLAGS "${LINK_FLAGS}")
#find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets)
#find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets)
include_directories(${PARASOLID})
include_directories(${CMAKE_SOURCE_DIR})
include_directories(${CMAKE_SOURCE_DIR}/config)
add_executable(ParasolidDemo evaluation_test.cpp case_reader.cpp case_reader.h)
# 将intersectTest的内容拷贝到build文件夹下
# 参考https://stackoverflow.com/questions/13429656/how-to-copy-contents-of-a-directory-into-build-directory-after-make-with-cmake
#add_custom_command(TARGET ParasolidDemo PRE_BUILD
# COMMAND ${CMAKE_COMMAND} -E copy_directory
# ${CMAKE_SOURCE_DIR}/intersectCases/ $<TARGET_FILE_DIR:ParasolidDemo>/intersectCases)
target_link_libraries(ParasolidDemo PUBLIC "${PARASOLID}/frustrum.lib")
target_link_libraries(ParasolidDemo PUBLIC "${PARASOLID}/fg.lib")
target_link_libraries(ParasolidDemo PUBLIC "${PARASOLID}/pskernel_archive.lib")
#target_link_libraries(ParasolidDemo PRIVATE Qt${QT_VERSION_MAJOR}::Widgets)