-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
60 lines (52 loc) · 1.85 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
cmake_minimum_required(VERSION 3.8)
project(StandaloneSphericalRidgelets)
# Set a default build type if none was specified
set(default_build_type "Release")
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to '${default_build_type}' as none was specified.")
set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE
STRING "Choose the type of build." FORCE)
# Set the possible values of build type for cmake-gui
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
"Debug" "Release" "MinSizeRel" "RelWithDebInfo")
endif()
#Configure external project with the same cmake generator
if(CMAKE_EXTRA_GENERATOR)
set(gen "${CMAKE_EXTRA_GENERATOR} - ${CMAKE_GENERATOR}")
else()
set(gen "${CMAKE_GENERATOR}" )
endif()
if(UKF_USE_FLOAT)
set(USE_FLOAT 1)
endif()
include("${CMAKE_CURRENT_SOURCE_DIR}/Common.cmake")
include("${CMAKE_CURRENT_SOURCE_DIR}/libs.cmake")
message("Build type: ${CMAKE_BUILD_TYPE}")
message("C options: ${CMAKE_C_FLAGS}")
message("Cxx options: ${CMAKE_CXX_FLAGS}")
if(JUST_BUILD)
message(STATUS "Build Spherical Ridgelets as a standalone application")
set(SPH_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Ridgelets/SphericalRidgelets)
set(PRJ_NAME SphericalRidgeletsStandalone)
set(${PRJ_NAME}_DEPENDENCIES
Eigen3
ITK
)
ExternalProject_Add(${PRJ_NAME}
DEPENDS ${${PRJ_NAME}_DEPENDENCIES}
DOWNLOAD_COMMAND ""
INSTALL_COMMAND ""
SOURCE_DIR ${SPH_DIR}
BINARY_DIR ${PRJ_NAME}-build
CMAKE_GENERATOR ${gen}
CMAKE_ARGS
-DEigen3_DIR:PATH=${Eigen3_DIR}
-DITK_DIR:PATH=${ITK_DIR}
-DSPH_DIR:PATH=${SPH_DIR}
-DBUILD_TU:STRING=1
-DUSE_FLOAT:STRING=${USE_FLOAT}
)
else()
message(STATUS "Include Spherical Ridgelets for ExternalProject_Add() in ${SPH_DIR}")
include(${CMAKE_CURRENT_SOURCE_DIR}/Ridgelets/SphericalRidgelets/CMakeLists.txt)
endif()