28 lines
657 B
CMake
28 lines
657 B
CMake
cmake_minimum_required(VERSION 3.18.4)
|
|
|
|
if(NOT DEFINED VCPKG_ROOT_PATH)
|
|
set(VCPKG_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/vcpkg)
|
|
endif()
|
|
|
|
if(NOT DEFINED CMAKE_TOOLCHAIN_FILE)
|
|
set(TOOLCHAIN_PATH ${VCPKG_ROOT_PATH}/scripts/buildsystems/vcpkg.cmake)
|
|
|
|
set(CMAKE_TOOLCHAIN_FILE
|
|
"${TOOLCHAIN_PATH}"
|
|
CACHE STRING "Vcpkg toolchain file")
|
|
|
|
message("Using default toolchain file")
|
|
endif()
|
|
|
|
|
|
project(clean_files CXX)
|
|
|
|
|
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
|
|
|
|
find_package(nlohmann_json CONFIG REQUIRED)
|
|
|
|
|
|
add_executable(clean_files src/main.cpp)
|
|
target_link_libraries(clean_files PRIVATE nlohmann_json nlohmann_json::nlohmann_json)
|