cmake_minimum_required(VERSION 3.10 FATAL_ERROR) if(DEFINED CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "Choose build type") else(DEFINED CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose build type") endif(DEFINED CMAKE_BUILD_TYPE) project(DENTAIRE) set(THREADS_PREFER_PTHREAD_FLAG ON) find_package(Threads REQUIRED) IF(NOT TARGET nutil-dynamic AND NOT TARGET nutil-static AND NOT INSIDE_CADXFEM_TREE) add_subdirectory(nutil) endif() include_directories(. ${NUTIL_INCLUDE_DIRECTORIES} ${NUTIL_EXTERNAL_INCLUDES} eigen GeometricTools/GTE nanoflann/include ) add_executable (dentaire dentaire.cc geometry.cc fileIO.cc interface_callbacks.cc program_options.cc) add_executable (dentaire-static EXCLUDE_FROM_ALL dentaire.cc geometry.cc fileIO.cc interface_callbacks.cc program_options.cc) SET_TARGET_PROPERTIES(dentaire PROPERTIES OUTPUT_NAME "dentaire") SET_TARGET_PROPERTIES(dentaire-static PROPERTIES OUTPUT_NAME "dentaire") target_link_libraries (dentaire ${LIBS} nutil-dynamic ndisplay-dynamic Threads::Threads ) target_link_libraries (dentaire-static ${LIBS} nutil-static ndisplay-static Threads::Threads ) if(UNIX) install(TARGETS dentaire) install(FILES dentaire.png DESTINATION "${CMAKE_INSTALL_PREFIX}/share/pixmaps/96x96") install(FILES dentaire.desktop DESTINATION "${CMAKE_INSTALL_PREFIX}/share/applications") endif()