forked from eXpl0it3r/bnkextr
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
23 lines (18 loc) · 716 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
cmake_minimum_required(VERSION 3.15)
project(bnkextr LANGUAGES CXX)
add_executable(${PROJECT_NAME} "bnkextr.cpp" "bnkextr.hpp")
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17)
set_target_properties(${PROJECT_NAME}
PROPERTIES
CXX_STANDARD_REQUIRED YES
CXX_EXTENSIONS NO
)
# Static Runtime
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
set_property(TARGET ${PROJECT_NAME} PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
elseif((CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT APPLE)
target_link_options(${PROJECT_NAME} PRIVATE -static)
endif()
# Install executable
install(TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION .)