25 lines
662 B
CMake
25 lines
662 B
CMake
cmake_minimum_required(VERSION 3.0.0)
|
|
project(cleaner VERSION 0.1.0 LANGUAGES C CXX)
|
|
|
|
include(CTest)
|
|
enable_testing()
|
|
|
|
if (MSVC_VERSION GREATER_EQUAL "1900")
|
|
include(CheckCXXCompilerFlag)
|
|
CHECK_CXX_COMPILER_FLAG("/std:c++17" _cpp_latest_flag_supported)
|
|
if (_cpp_latest_flag_supported)
|
|
add_compile_options("/std:c++17")
|
|
endif()
|
|
endif()
|
|
|
|
add_executable(cleaner main.cpp)
|
|
|
|
find_package(nlohmann_json 3.2.0 REQUIRED)
|
|
target_link_libraries(cleaner PRIVATE nlohmann_json::nlohmann_json)
|
|
|
|
set_property(TARGET cleaner PROPERTY CXX_STANDARD 17)
|
|
|
|
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
|
|
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
|
|
include(CPack)
|