-
Notifications
You must be signed in to change notification settings - Fork 5
/
CMakeLists.txt
37 lines (27 loc) · 1.07 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
cmake_minimum_required(VERSION 3.15)
set(PROJECT_NAME NSST)
project(${PROJECT_NAME})
set(CMAKE_CXX_COMPILER g++)
set(CMAKE_CXX_STANDARD 17)
set(HEADERS
Config.h )
set(SOURCES
src/NSST.cpp
main.cpp )
include_directories(external_lib include)
add_executable(${PROJECT_NAME} ${HEADERS} ${SOURCES})
set(EXTERNAL_LIB_PATH
${PROJECT_SOURCE_DIR}/external_lib)
set(EIGEN_PATH
${EXTERNAL_LIB_PATH}/eigen-3.4.0)
message("-- Linking FFTW3")
if(WIN32)
target_include_directories(${PROJECT_NAME} PRIVATE "${EXTERNAL_LIB_PATH}/fftw-3.3.5-dll64" "${EIGEN_PATH}")
target_link_directories(${PROJECT_NAME} PRIVATE "${EXTERNAL_LIB_PATH}/fftw-3.3.5-dll64" "${EIGEN_PATH}")
target_link_libraries(${PROJECT_NAME} PRIVATE libfftw3f-3)
endif(WIN32)
if(UNIX)
target_include_directories(${PROJECT_NAME} PRIVATE "${EXTERNAL_LIB_PATH}/fftw-3.3.5" "${EIGEN_PATH}")
target_link_directories(${PROJECT_NAME} PRIVATE "${EXTERNAL_LIB_PATH}/fftw-3.3.5" "${EIGEN_PATH}")
target_link_libraries(${PROJECT_NAME} PRIVATE fftw3f)
endif(UNIX)