[winpr,path] add Cwalk dependency
This commit is contained in:
parent
08d21e9f09
commit
789ba52ea5
28
cmake/ExternalProjectCwalk.cmake
Normal file
28
cmake/ExternalProjectCwalk.cmake
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
# Include Cwalk library as external project.
|
||||||
|
#
|
||||||
|
# Download from github and build the library.
|
||||||
|
include(FetchContent)
|
||||||
|
|
||||||
|
# Disable -Werror for cwalk build unless we have set it
|
||||||
|
if (NOT ENABLE_WARNING_ERROR)
|
||||||
|
set(IGNORE_WARNINGS ON CACHE INTERNAL "[Cwalk] cached build variable")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# If there is already a local copy of cwalk use it
|
||||||
|
if (EXISTS ${CMAKE_SOURCE_DIR}/external/cwalk)
|
||||||
|
set(FETCHCONTENT_SOURCE_DIR_CWALK ${CMAKE_SOURCE_DIR}/external/cwalk)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
FetchContent_Declare(
|
||||||
|
Cwalk
|
||||||
|
# URL https://github.com/likle/cwalk/archive/refs/tags/v1.2.9.tar.gz
|
||||||
|
# URL_HASH SHA256=54f160031687ec90a414e0656cf6266445207cb91b720dacf7a7c415d6bc7108
|
||||||
|
|
||||||
|
GIT_REPOSITORY https://github.com/likle/cwalk.git
|
||||||
|
GIT_TAG v1.2.9
|
||||||
|
GIT_SHALLOW ON
|
||||||
|
OVERRIDE_FIND_PACKAGE
|
||||||
|
)
|
||||||
|
|
||||||
|
FetchContent_MakeAvailable(Cwalk)
|
||||||
|
|
@ -18,6 +18,8 @@
|
|||||||
# Include our extra modules
|
# Include our extra modules
|
||||||
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../cmake/)
|
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../cmake/)
|
||||||
|
|
||||||
|
include(ExternalProjectCwalk)
|
||||||
|
|
||||||
if (NOT FREERDP_UNIFIED_BUILD)
|
if (NOT FREERDP_UNIFIED_BUILD)
|
||||||
cmake_minimum_required(VERSION 3.13)
|
cmake_minimum_required(VERSION 3.13)
|
||||||
|
|
||||||
|
@ -23,6 +23,8 @@ winpr_module_add(
|
|||||||
file.c
|
file.c
|
||||||
)
|
)
|
||||||
|
|
||||||
|
winpr_library_add_private(cwalk)
|
||||||
|
|
||||||
if(BUILD_TESTING_INTERNAL OR BUILD_TESTING)
|
if(BUILD_TESTING_INTERNAL OR BUILD_TESTING)
|
||||||
add_subdirectory(test)
|
add_subdirectory(test)
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user