-
Notifications
You must be signed in to change notification settings - Fork 104
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
42 lines (34 loc) · 1004 Bytes
/
Copy pathCMakeLists.txt
File metadata and controls
42 lines (34 loc) · 1004 Bytes
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.10)
project(NuklearDemo CXX)
set(SOURCE
src/NuklearDemo.cpp
src/NkDiligent.cpp
)
set(INCLUDE
src/NuklearDemo.hpp
src/NkDiligent.h
)
if(PLATFORM_WIN32)
list(APPEND SOURCE src/NkInputWin32.cpp src/NkInputWin32.h src/NuklearDemoWin32.cpp)
endif()
add_sample_app(NuklearDemo
IDE_FOLDER DiligentSamples/Samples
SOURCES ${SOURCE}
INCLUDES ${INCLUDE}
)
target_include_directories(NuklearDemo PRIVATE ${DILIGENT_NUKLEAR_DIR})
if(MSVC)
target_compile_definitions(NuklearDemo PRIVATE _CRT_SECURE_NO_WARNINGS)
set_source_files_properties(src/NkDiligent.cpp PROPERTY COMPILE_FLAGS
/wd4127 # Conditional expression is constant
)
endif()
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "13.0")
set_property(SOURCE
src/NkDiligent.cpp
APPEND_STRING PROPERTY
COMPILE_FLAGS " -Wno-unused-but-set-variable"
)
endif()
endif()