-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
30 lines (22 loc) · 904 Bytes
/
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
cmake_minimum_required(VERSION 3.22.1)
project(tdx-lib)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_C_STANDARD 23)
set(CMAKE_CXX_STANDARD 20)
#set(FLAG "-fmodules-ts")
include_directories(${CMAKE_BINARY_DIR}/lib/imports)
include_directories(./lib/imports)
include_directories(./lib/internal)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/build/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/build/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/build/bin)
#if (UNIX)
# set(CMAKE_EXE_LINKER_FLAGS "-rdynamic")
#endif()
file(GLOB_RECURSE MODELS models/*.cpp )
file(GLOB_RECURSE LIB lib/internal/*.cpp )
add_library(tdx_static SHARED main.cpp ${MODELS} ${LIB})
add_library(tdx STATIC main.cpp ${MODELS} ${LIB})
add_executable(tdxsd main.cpp ${MODELS} ${LIB})
add_executable(tdxsd_tests tdx_tests/tests.cpp ${MODELS} ${LIB})
# add_library(tdx MODULE main.cpp)