mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-poco.git
synced 2025-11-01 19:17:59 +00:00
CMake: make utf8proc, PCRE2, zlib and expat private dependencies
In the unbundled build, utf8proc, PCRE2, zlib and expat were all included as part of the CMake link interface, and therefore the CMake config file required find_dependency() calls for each. These libraries are internal implementation details of Poco and are not exposed in any public API. Therefore, we can make them private dependencies and avoid the find_dependency() calls and their associated find scripts.
This commit is contained in:
committed by
Matej Kenda
parent
3b85dada5a
commit
4b8f0a36a6
@@ -562,11 +562,6 @@ install(
|
||||
Devel
|
||||
)
|
||||
|
||||
if(POCO_UNBUNDLED)
|
||||
install(FILES cmake/FindPCRE2.cmake DESTINATION "${PocoConfigPackageLocation}")
|
||||
install(FILES cmake/FindUtf8Proc.cmake DESTINATION "${PocoConfigPackageLocation}")
|
||||
endif()
|
||||
|
||||
message(STATUS "CMake ${CMAKE_VERSION} successfully configured ${PROJECT_NAME} using ${CMAKE_GENERATOR} generator")
|
||||
message(STATUS "${PROJECT_NAME} package version: ${PROJECT_VERSION}")
|
||||
if(BUILD_SHARED_LIBS)
|
||||
|
||||
@@ -99,7 +99,7 @@ set_target_properties(Foundation
|
||||
)
|
||||
|
||||
if(POCO_UNBUNDLED)
|
||||
target_link_libraries(Foundation PUBLIC Pcre2::Pcre2 ZLIB::ZLIB Utf8Proc::Utf8Proc)
|
||||
target_link_libraries(Foundation PRIVATE Pcre2::Pcre2 ZLIB::ZLIB Utf8Proc::Utf8Proc)
|
||||
target_compile_definitions(Foundation PUBLIC POCO_UNBUNDLED)
|
||||
else()
|
||||
target_compile_definitions(Foundation PUBLIC UTF8PROC_STATIC)
|
||||
|
||||
@@ -1,9 +1 @@
|
||||
if(@POCO_UNBUNDLED@)
|
||||
include(CMakeFindDependencyMacro)
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
|
||||
find_dependency(ZLIB REQUIRED)
|
||||
find_dependency(PCRE2 REQUIRED)
|
||||
find_dependency(Utf8Proc REQUIRED)
|
||||
endif()
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/PocoFoundationTargets.cmake")
|
||||
|
||||
@@ -50,7 +50,7 @@ target_include_directories(XML
|
||||
)
|
||||
|
||||
if(POCO_UNBUNDLED)
|
||||
target_link_libraries(XML PUBLIC EXPAT::EXPAT)
|
||||
target_link_libraries(XML PRIVATE EXPAT::EXPAT)
|
||||
target_compile_definitions(XML PUBLIC POCO_UNBUNDLED)
|
||||
else()
|
||||
if(WIN32)
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
include(CMakeFindDependencyMacro)
|
||||
find_dependency(PocoFoundation)
|
||||
if(@POCO_UNBUNDLED@)
|
||||
if(CMAKE_VERSION VERSION_LESS "3.10")
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/V39")
|
||||
endif()
|
||||
find_dependency(EXPAT REQUIRED)
|
||||
endif()
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/PocoXMLTargets.cmake")
|
||||
|
||||
Reference in New Issue
Block a user