Skip to content

CMake: make utf8proc, PCRE2, zlib and expat private dependencies #4937

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Foundation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,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)
Expand Down
8 changes: 0 additions & 8 deletions Foundation/cmake/PocoFoundationConfig.cmake
Original file line number Diff line number Diff line change
@@ -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")
2 changes: 1 addition & 1 deletion XML/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 0 additions & 7 deletions XML/cmake/PocoXMLConfig.cmake
Original file line number Diff line number Diff line change
@@ -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")
Loading