-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
28 lines (24 loc) · 923 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
cmake_minimum_required(VERSION 3.0)
project(nall LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
add_library(nall INTERFACE)
target_include_directories(nall INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/../)
if (WIN32)
enable_language(RC)
target_compile_options(nall INTERFACE -mthreads)
target_link_libraries(nall INTERFACE pthread ws2_32 ole32)
elseif(UNIX)
if(APPLE)
enable_language(OBJC)
enable_language(OBJCXX)
target_link_libraries(nall INTERFACE c++ objc)
target_compile_options(nall INTERFACE -stdlib=libc++ -mmacosx-version-min=10.9 -Wno-auto-var-id -fobjc-arc -Wl,-segprot,__DATA,rwx,rw)
else()
target_link_libraries(nall INTERFACE dl)
endif()
endif()
if (CMAKE_BUILD_TYPE STREQUAL Debug)
target_compile_definitions(nall INTERFACE BUILD_DEBUG)
elseif(CMAKE_BUILD_TYPE STREQUAL Release)
target_compile_definitions(nall INTERFACE BUILD_RELEASE)
endif()