-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
42 lines (31 loc) · 1.02 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
cmake_minimum_required(VERSION 3.15)
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/version.txt" projectVersion)
project(fmu4cpp-template VERSION ${projectVersion})
option(FMU4CPP_BUILD_TESTS "Build internal tests" OFF)
set(CMAKE_CXX_STANDARD 20)
if (MSVC)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
endif ()
############modelIdentifier###################
set(modelIdentifier identity) # <-- CHANGE ME
################################################
include("cmake/generate_fmu.cmake")
if (MSVC)
# link statically against the the Visual C runtime
string(REPLACE "/MD" "/MT" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
string(REPLACE "/MDd" "/MTd" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
endif ()
if ("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8")
set(BITNESS 64)
else ()
set(BITNESS 32)
endif ()
if (WIN32)
set(TARGET_PLATFORM win${BITNESS})
elseif (APPLE)
set(TARGET_PLATFORM darwin${BITNESS})
else ()
set(TARGET_PLATFORM linux${BITNESS})
endif ()
add_subdirectory(export)
add_subdirectory(src)