mirror of
https://github.com/FreeRDP/FreeRDP.git
synced 2024-11-23 01:44:35 +08: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:
parent
10ee2f72d9
commit
1b663ceffe
@ -253,8 +253,8 @@ set(FILENAME "ChannelOptions.cmake")
|
||||
file(GLOB FILEPATHS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*/${FILENAME}")
|
||||
|
||||
foreach(FILEPATH ${FILEPATHS})
|
||||
if(${FILEPATH} MATCHES "^([^/]*)//${FILENAME}")
|
||||
string(REGEX REPLACE "^([^/]*)//${FILENAME}" "\\1" DIR ${FILEPATH})
|
||||
if(${FILEPATH} MATCHES "^([^/]*)/+${FILENAME}")
|
||||
string(REGEX REPLACE "^([^/]*)/+${FILENAME}" "\\1" DIR ${FILEPATH})
|
||||
set(CHANNEL_OPTION)
|
||||
include(${FILEPATH})
|
||||
if(${CHANNEL_OPTION})
|
||||
|
@ -24,7 +24,9 @@ set(${MODULE_PREFIX}_SRCS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/addin.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/addin.h)
|
||||
|
||||
if(CHANNEL_STATIC_CLIENT_ENTRIES)
|
||||
list(REMOVE_DUPLICATES CHANNEL_STATIC_CLIENT_ENTRIES)
|
||||
endif()
|
||||
|
||||
foreach(STATIC_ENTRY ${CHANNEL_STATIC_CLIENT_ENTRIES})
|
||||
foreach(STATIC_MODULE ${CHANNEL_STATIC_CLIENT_MODULES})
|
||||
|
@ -63,8 +63,8 @@ set(FILENAME "ModuleOptions.cmake")
|
||||
file(GLOB FILEPATHS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*/${FILENAME}")
|
||||
|
||||
foreach(FILEPATH ${FILEPATHS})
|
||||
if(${FILEPATH} MATCHES "^([^/]*)//${FILENAME}")
|
||||
string(REGEX REPLACE "^([^/]*)//${FILENAME}" "\\1" FREERDP_CLIENT ${FILEPATH})
|
||||
if(${FILEPATH} MATCHES "^([^/]*)/+${FILENAME}")
|
||||
string(REGEX REPLACE "^([^/]*)/+${FILENAME}" "\\1" FREERDP_CLIENT ${FILEPATH})
|
||||
set(FREERDP_CLIENT_ENABLED 0)
|
||||
include(${FILEPATH})
|
||||
if(FREERDP_CLIENT_ENABLED)
|
||||
|
@ -48,8 +48,8 @@ set(FILENAME "ModuleOptions.cmake")
|
||||
file(GLOB FILEPATHS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*/${FILENAME}")
|
||||
|
||||
foreach(FILEPATH ${FILEPATHS})
|
||||
if(${FILEPATH} MATCHES "^([^/]*)//${FILENAME}")
|
||||
string(REGEX REPLACE "^([^/]*)//${FILENAME}" "\\1" FREERDP_SERVER ${FILEPATH})
|
||||
if(${FILEPATH} MATCHES "^([^/]*)/+${FILENAME}")
|
||||
string(REGEX REPLACE "^([^/]*)/+${FILENAME}" "\\1" FREERDP_SERVER ${FILEPATH})
|
||||
set(FREERDP_SERVER_ENABLED 0)
|
||||
include(${FILEPATH})
|
||||
if(FREERDP_SERVER_ENABLED)
|
||||
|
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)
|
||||
|
Loading…
Reference in New Issue
Block a user