Fix CMakeLists.txt syntax error and update build script to use Visual Studio 2022
This commit is contained in:
@ -31,13 +31,15 @@ else()
|
||||
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/external/json/include/nlohmann/json.hpp")
|
||||
set(NLOHMANN_JSON_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/external/json/include")
|
||||
else()
|
||||
# Try to download it
|
||||
# Try to download it with compatibility settings
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(
|
||||
nlohmann_json
|
||||
GIT_REPOSITORY https://github.com/nlohmann/json.git
|
||||
GIT_TAG v3.11.2
|
||||
)
|
||||
# Set compatibility flag for older CMake versions
|
||||
set(CMAKE_POLICY_VERSION_MINIMUM 3.5)
|
||||
FetchContent_MakeAvailable(nlohmann_json)
|
||||
set(NLOHMANN_JSON_INCLUDE_DIRS ${nlohmann_json_SOURCE_DIR}/include)
|
||||
endif()
|
||||
@ -85,4 +87,4 @@ install(TARGETS privatebinapi
|
||||
ARCHIVE DESTINATION lib
|
||||
)
|
||||
|
||||
install(FILES ${HEADERS} DESTINATION include/privatebinapi))
|
||||
install(FILES ${HEADERS} DESTINATION include/privatebinapi)
|
||||
Reference in New Issue
Block a user