-
Notifications
You must be signed in to change notification settings - Fork 4
/
CMakeLists-Windows-CalcEngine.txt
27 lines (23 loc) · 2 KB
/
CMakeLists-Windows-CalcEngine.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
cmake_minimum_required( VERSION 2.8.7 )
# Create include directories that will connect to library itself. This must be created before downloading
# Windows Calculation Engine library or otherwise connections will not be created
# set(CommonIncludeDir "${CMAKE_SOURCE_DIR}/3rdparty/Windows-CalcEngine/src")
set(CommonIncludeDir "${CMAKE_BINARY_DIR}/Windows-CalcEngine-src/src")
set(WindowsCalcEngine_INCLUDE_DIRS "${CommonIncludeDir}/Common/src")
set(WindowsCalcEngine_INCLUDE_DIRS ${WindowsCalcEngine_INCLUDE_DIRS} "${CommonIncludeDir}/Chromogenics/include")
set(WindowsCalcEngine_INCLUDE_DIRS ${WindowsCalcEngine_INCLUDE_DIRS} "${CommonIncludeDir}/Common/include")
set(WindowsCalcEngine_INCLUDE_DIRS ${WindowsCalcEngine_INCLUDE_DIRS} "${CommonIncludeDir}/Gases/include")
set(WindowsCalcEngine_INCLUDE_DIRS ${WindowsCalcEngine_INCLUDE_DIRS} "${CommonIncludeDir}/SingleLayerOptics/include")
set(WindowsCalcEngine_INCLUDE_DIRS ${WindowsCalcEngine_INCLUDE_DIRS} "${CommonIncludeDir}/MultiLayerOptics/include")
set(WindowsCalcEngine_INCLUDE_DIRS ${WindowsCalcEngine_INCLUDE_DIRS} "${CommonIncludeDir}/SpectralAveraging/include")
set(WindowsCalcEngine_INCLUDE_DIRS ${WindowsCalcEngine_INCLUDE_DIRS} "${CommonIncludeDir}/Tarcog/include")
set(WindowsCalcEngine_INCLUDE_DIRS ${WindowsCalcEngine_INCLUDE_DIRS} "${CommonIncludeDir}/Viewer/include")
include_directories(${WindowsCalcEngine_INCLUDE_DIRS})
# Download and create Windows Calculation Engine library
configure_file(CMakeLists-Windows-CalcEngine.txt.in ${CMAKE_BINARY_DIR}/Windows-CalcEngine-download/CMakeLists.txt)
execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" .
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/Windows-CalcEngine-download)
execute_process(COMMAND ${CMAKE_COMMAND} --build .
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/Windows-CalcEngine-download)
add_subdirectory(${CMAKE_BINARY_DIR}/Windows-CalcEngine-src "${CMAKE_BINARY_DIR}/Windows-CalcEngine-src")
set(WindowsCalcEngine_LIB "${CMAKE_SHARED_LIBRARY_PREFIX}Windows-CalcEngine${CMAKE_SHARED_LIBRARY_SUFFIX}")