# The name of our project is "GNURBS". CMakeLists files in this project can # refer to the root source directory of the project as ${HELLO_SOURCE_DIR} and # to the root binary directory of the project as ${HELLO_BINARY_DIR}. 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(GNURBS) option(GNURBS_ENABLE_TEST "Enable Testing-related binary targets" ON) option(GNURBS_ENABLE_VTK_INTERFACE "Enable VTK integration targets" ON) option(GNURBS_ENABLE_LESSONS "Enable Lessons-related binary targets" OFF) IF(NOT TARGET nutil-dynamic AND NOT INSIDE_CADXFEM_TREE) add_subdirectory(nutil) include_directories(${GNURBS_BINARY_DIR}/nutil) endif() include_directories(. ${nutil_SOURCE_DIR}) set(GNURBS_EXTERNAL_INCLUDES ${NUTIL_EXTERNAL_INCLUDES} ${CMAKE_CURRENT_SOURCE_DIR}/nutil CACHE STRING "Gnurbs External include directories") set(GNURBS_EXTERNAL_LIBRARY_DIRS ${NUTIL_EXTERNAL_LIBRARY_DIRS} ${CMAKE_CURRENT_BINARY_DIR}/nutil CACHE STRING "Gnurbs External library dirs") set(GNURBS_EXTERNAL_LIBRARIES ${NUTIL_EXTERNAL_LIBRARIES} nutil-dynamic CACHE STRING "Gnurbs External libraries dirs") add_subdirectory(api) include_directories (${GNURBS_SOURCE_DIR}/api) link_directories (${GNURBS_BINARY_DIR}/api) if(GNURBS_ENABLE_VTK_INTERFACE) # Find VTK find_package(VTK REQUIRED) if(NOT VTK_DIR) message(FATAL_ERROR "Please set VTK_DIR.") endif(NOT VTK_DIR) include(${VTK_USE_FILE}) include_directories (${GNURBS_SOURCE_DIR}/vtk) include_directories (${GNURBS_SOURCE_DIR}/nutil/vtkdisplay) add_subdirectory(vtk) link_directories (${GNURBS_BINARY_DIR}/vtk) link_directories (${GNURBS_BINARY_DIR}/nutil/vtkdisplay) endif(GNURBS_ENABLE_VTK_INTERFACE) add_subdirectory(test)