mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-14 16:34:18 +09:00
build: cmake 3.1 compatibility
* fix problem with REMOVE_DUPLICATES on undefined lists * since 3.1 file(GLOB FILEPATHS RELATIVE .. returns single / instead of // as previously - necessary adoptions for regex and matches done. Should work with all cmake versions. Tested with 3.1.0-rc3
This commit is contained in:
6
third-party/CMakeLists.txt
vendored
6
third-party/CMakeLists.txt
vendored
@@ -22,11 +22,11 @@
|
||||
file(GLOB all_valid_subdirs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*/CMakeLists.txt")
|
||||
|
||||
foreach(dir ${all_valid_subdirs})
|
||||
if(${dir} MATCHES "^([^/]*)//CMakeLists.txt")
|
||||
string(REGEX REPLACE "^([^/]*)//CMakeLists.txt" "\\1" dir_trimmed ${dir})
|
||||
if(${dir} MATCHES "^([^/]*)/+CMakeLists.txt")
|
||||
string(REGEX REPLACE "^([^/]*)/+CMakeLists.txt" "\\1" dir_trimmed ${dir})
|
||||
message(STATUS "Adding third-party component ${dir_trimmed}")
|
||||
add_subdirectory(${dir_trimmed})
|
||||
endif()
|
||||
endforeach(dir)
|
||||
|
||||
set(THIRD_PARTY_INCLUDES ${THIRD_PARTY_INCLUDES} PARENT_SCOPE)
|
||||
set(THIRD_PARTY_INCLUDES ${THIRD_PARTY_INCLUDES} PARENT_SCOPE)
|
||||
|
||||
Reference in New Issue
Block a user