File tree Expand file tree Collapse file tree 3 files changed +11
-9
lines changed Expand file tree Collapse file tree 3 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,13 @@ find_package(PkgConfig)
9090# now, we use a system provided crypto library for this purpose
9191pkg_check_modules(libgcrypt REQUIRED IMPORTED_TARGET libgcrypt)
9292
93+ option (USE_SYSTEM_CPR OFF "Use system-wide installed CPR" )
94+
95+ if (USE_SYSTEM_CPR)
96+ find_package (cpr REQUIRED)
97+ add_library (cpr ALIAS cpr::cpr)
98+ endif ()
99+
93100# add libraries shipped along with the project
94101add_subdirectory (lib)
95102
Original file line number Diff line number Diff line change @@ -10,12 +10,10 @@ add_subdirectory(libzsync)
1010
1111# external dependencies used as submodules
1212
13- # using system cURL as it has proper SSL support etc., and reduces the build time
14- set (USE_SYSTEM_CURL ON CACHE BOOL "" FORCE)
15- # disable CPR tests to save compile time and avoid clashes with own tests
16- set (BUILD_CPR_TESTS OFF CACHE BOOL "" FORCE)
17- add_subdirectory (cpr)
18- set_property (TARGET cpr PROPERTY POSITION_INDEPENDENT_CODE ON )
13+ if (NOT USE_SYSTEM_CPR)
14+ add_subdirectory (cpr)
15+ set_property (TARGET cpr PROPERTY POSITION_INDEPENDENT_CODE ON )
16+ endif ()
1917
2018# it's quite simple dealing with the args library directly from CMake
2119add_library (args INTERFACE )
Original file line number Diff line number Diff line change @@ -3,9 +3,6 @@ cmake_minimum_required(VERSION 3.2)
33set (CMAKE_CXX_STANDARD 11)
44set (CMAKE_POSITION_INDEPENDENT_CODE true )
55
6- # fix CPR target
7- target_include_directories (cpr PUBLIC ${CPR_INCLUDE_DIRS} )
8-
96set (zsync2_public_headers
107 ${PROJECT_SOURCE_DIR} /include /zsutil.h
118 ${PROJECT_SOURCE_DIR} /include /zsclient.h
You can’t perform that action at this time.
0 commit comments