-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
30 lines (25 loc) · 753 Bytes
/
CMakeLists.txt
File metadata and controls
30 lines (25 loc) · 753 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
cmake_minimum_required(VERSION 3.20)
project(nvapi-cli LANGUAGES CXX RC)
file(GLOB CLI_SOURCES CONFIGURE_DEPENDS "${CMAKE_SOURCE_DIR}/src/cli/*.cpp")
add_executable(nvapi-cli
src/nvapi-cli.cpp
nvapi-cli.rc
${CLI_SOURCES}
)
target_compile_features(nvapi-cli PRIVATE cxx_std_17)
target_include_directories(nvapi-cli PRIVATE "${CMAKE_SOURCE_DIR}/include")
target_compile_definitions(nvapi-cli PRIVATE WIN32 NOMINMAX)
if(MSVC)
target_compile_options(nvapi-cli PRIVATE /W4 /EHsc)
set_source_files_properties(nvapi-cli.rc PROPERTIES
COMPILE_FLAGS "/I\"${CMAKE_SOURCE_DIR}\""
)
endif()
target_link_libraries(nvapi-cli PRIVATE
"${CMAKE_SOURCE_DIR}/lib/nvapi64.lib"
d3d11
dxgi
opengl32
user32
gdi32
)