NothinFancy/TestGame/CMakeLists.txt

18 lines
549 B
CMake

# TestGame app CMakeLists.txt
add_executable(TestGame WIN32 "src/TestGame.cpp")
# Use C++20
set_property(TARGET TestGame PROPERTY CXX_STANDARD 20)
# Use "main" function
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /entry:mainCRTStartup")
# Keep the console in debug
if(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
set_property(TARGET TestGame PROPERTY WIN32_EXECUTABLE FALSE)
endif()
# Link to NF library
target_link_libraries(TestGame NothinFancy)
target_include_directories(TestGame PUBLIC "${CMAKE_SOURCE_DIR}/NothinFancy/src/include")