-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
38 lines (35 loc) · 1.75 KB
/
Copy pathCMakeLists.txt
File metadata and controls
38 lines (35 loc) · 1.75 KB
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
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
list(APPEND NTSHENGN_COMMON_DEFINES NTSHENGN_COMPILER_GCC)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
list(APPEND NTSHENGN_COMMON_DEFINES NTSHENGN_COMPILER_CLANG)
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
list(APPEND NTSHENGN_COMMON_DEFINES NTSHENGN_COMPILER_MSVC)
else()
message(WARNING "Using an untested compiler '${CMAKE_CXX_COMPILER_ID}'. "
"Consider using GCC, Clang or MSVC.")
list(APPEND NTSHENGN_COMMON_DEFINES NTSHENGN_COMPILER_UNKNOWN)
endif()
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
list(APPEND NTSHENGN_COMMON_DEFINES NTSHENGN_OS_WINDOWS _CRT_SECURE_NO_WARNINGS NOMINMAX)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
list(APPEND NTSHENGN_COMMON_DEFINES NTSHENGN_OS_LINUX)
elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
list(APPEND NTSHENGN_COMMON_DEFINES NTSHENGN_OS_FREEBSD)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
list(APPEND NTSHENGN_COMMON_DEFINES NTSHENGN_OS_MACOS)
endif()
set(NTSHENGN_DEFINES ${NTSHENGN_COMMON_DEFINES} PARENT_SCOPE)
add_library(Common INTERFACE)
target_include_directories(Common INTERFACE asset_manager)
target_include_directories(Common INTERFACE command_line)
target_include_directories(Common INTERFACE ecs)
target_include_directories(Common INTERFACE frame_limiter)
target_include_directories(Common INTERFACE job_system)
target_include_directories(Common INTERFACE modules)
target_include_directories(Common INTERFACE networking)
target_include_directories(Common INTERFACE profiler)
target_include_directories(Common INTERFACE resources)
target_include_directories(Common INTERFACE scene_manager)
target_include_directories(Common INTERFACE script)
target_include_directories(Common INTERFACE utils)
add_library(NutshellEngine::Common ALIAS Common)