Skip to content

Commit

Permalink
add cmake component to limit the installation of only binary
Browse files Browse the repository at this point in the history
  • Loading branch information
nodtem66 committed Feb 2, 2021
1 parent 4c3d07b commit 882a71c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 7 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,14 @@ target_link_libraries(${PROJECT_NAME} PRIVATE igl::core tbb Threads::Threads ${L
#target_include_directories(Sol2_Test PRIVATE "${PROJECT_SOURCE_DIR}/include" ${SOL2_INCLUDE_DIR} ${LUA_INCLUDE_DIRS})
#target_link_libraries(Sol2_Test PRIVATE Threads::Threads ${LUA_LIBRARIES})

add_executable(SliceTest ${MAIN_SOURCES} ${PROJECT_SOURCE_DIR}/src/SliceTest.cpp )
target_include_directories(SliceTest PRIVATE "${PROJECT_SOURCE_DIR}/include" ${VCG_INCLUDE_DIR} ${EIGEN_INCLUDE_DIR})
target_link_libraries(SliceTest PRIVATE tbb)
add_executable("${PROJECT_NAME}.SliceTest" ${MAIN_SOURCES} ${PROJECT_SOURCE_DIR}/src/SliceTest.cpp )
target_include_directories("${PROJECT_NAME}.SliceTest" PRIVATE "${PROJECT_SOURCE_DIR}/include" ${VCG_INCLUDE_DIR} ${EIGEN_INCLUDE_DIR})
target_link_libraries("${PROJECT_NAME}.SliceTest" PRIVATE tbb)

#add_executable(Fixer ${MAIN_SOURCES} ${PROJECT_SOURCE_DIR}/src/FixSelfIntersect.cpp)
#target_include_directories(Fixer PRIVATE "${PROJECT_SOURCE_DIR}/include" ${VCG_INCLUDE_DIR} ${EIGEN_INCLUDE_DIR})
#target_link_libraries(Fixer tbb)

include(GNUInstallDirs)
install(TARGETS "${PROJECT_NAME}" DESTINATION bin COMPONENT scaffolder)
install(TARGETS "${PROJECT_NAME}.SliceTest" DESTINATION bin COMPONENT scaffolder)
4 changes: 3 additions & 1 deletion cmake/FindTBB.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#
# TBB_FOUND - system has TBB
# TBB_INCLUDE_DIR - **the** TBB include directory
cmake_minimum_required(VERSION 3.1)

if(TBB_FOUND)
return()
endif()
Expand All @@ -23,7 +25,7 @@ set(TBB_ROOT_DIR ${TBB_INCLUDE_DIR}/../)
set(TBB_TEST OFF CACHE INTERNAL "turn off")
set(TBB_EXAMPLES OFF CACHE INTERNAL "turn off")
set(TBB_STRICT OFF CACHE INTERNAL "turn off")
set(BUILD_SHARED_LIBS off CACHE INTERNAL "turn off dynamic LINK_DEPENDS (not recommended by intel)")
set(BUILD_SHARED_LIBS OFF CACHE INTERNAL "turn off dynamic LINK_DEPENDS (not recommended by intel)")

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(TBB
Expand Down

0 comments on commit 882a71c

Please sign in to comment.