update cmakelist

This commit is contained in:
2025-02-11 10:43:28 +08:00
parent 2901590f00
commit 613c73c812
36 changed files with 92 additions and 75 deletions

View File

@@ -35,7 +35,7 @@ if (mesh_dimen == gctl::MESH_2D && mesh_tp == gctl::REGULAR_MESH) \
else if (mesh_dimen == gctl::MESH_2D && mesh_tp == gctl::LINEAR_MESH) \
mesh_ptr = new gctl::linear_mesh_2d; \
else if (mesh_dimen == gctl::MESH_2D && mesh_tp == gctl::TRI_TET_MESH) \
mesh_ptr = new gctl::triangle_mesh; \
mesh_ptr = new gctl::triangle2d_mesh; \
else if (mesh_dimen == gctl::MESH_3D && mesh_tp == gctl::REGULAR_MESH) \
mesh_ptr = new gctl::regular_mesh_3d; \
else if (mesh_dimen == gctl::MESH_3D && mesh_tp == gctl::LINEAR_MESH) \

View File

@@ -5,18 +5,10 @@ set(INSTALL_DIR sbin)
find_package(GCTL REQUIRED)
include_directories(${GCTL_INC_DIR})
find_package(GCTL_GRAPHIC REQUIRED)
include_directories(${GCTL_GRAPHIC_INC_DIR})
find_package(GCTL_MESH REQUIRED)
include_directories(${GCTL_MESH_INC_DIR})
if(GCTL_GRAPHIC_MATHGL)
find_package(MathGL2 REQUIRED FLTK)
message(STATUS "mathGL Version: " ${MathGL2_VERSION})
include_directories(${MathGL2_INCLUDE_DIRS})
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3")
if(WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
@@ -32,12 +24,6 @@ set_target_properties(${TOOL_NAME} PROPERTIES INSTALL_RPATH /usr/local/lib)
set_target_properties(${TOOL_NAME} PROPERTIES CXX_STANDARD 17 CXX_STANDARD_REQUIRED ON)
target_link_libraries(${TOOL_NAME} PUBLIC ${GCTL_LIB})
target_link_libraries(${TOOL_NAME} PUBLIC ${GCTL_GRAPHIC_LIB})
target_link_libraries(${TOOL_NAME} PUBLIC ${GCTL_MESH_LIB})
if(GCTL_GRAPHIC_MATHGL)
target_link_libraries(${TOOL_NAME} PUBLIC ${MathGL2_LIBRARIES} ${MathGL2_FLTK_LIBRARIES})
endif()
install(TARGETS ${TOOL_NAME} RUNTIME DESTINATION ${INSTALL_DIR})