-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
40 lines (30 loc) · 1.31 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
# Hierarchical project as described here
# https://bloerg.net/2012/11/10/cmake-and-distutils.html
cmake_minimum_required (VERSION 3.12 FATAL_ERROR)
enable_language(Fortran C)
project(NVEL Fortran C)
# read the pyNVEL version number from a file
file(STRINGS "VERSION" PACKAGE_VERSION REGEX "[0-9]+\\.[0-9]+\\.[0-9]+")
message(STATUS "Package version: ${PACKAGE_VERSION}")
# Direct all library output to the pynvel folder
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/python/pynvel)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/python/pynvel)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/python/pynvel)
set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_SOURCE_DIR}/dist)
# Define default configuration variables
option(TARGET_32BIT "Set to yes if target architecture is 32 bit." No)
option(NATIVE_ARCH "Build targeting the host architecture." No)
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
endif ()
message(STATUS "Target native architecture: ${NATIVE_ARCH}")
message(STATUS "Target 32 bit architecture: ${TARGET_32BIT}")
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
message(STATUS "Install prefix: ${CMAKE_INSTALL_PREFIX}")
if (TARGET_32BIT)
set(vollib vollib)
else ()
set(vollib vollib64)
endif ()
add_subdirectory(VolumeLibrary)
add_subdirectory(python)