mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-poco.git
synced 2025-11-01 19:17:59 +00:00
Fix cross-compilation against Poco pre-built (#2599)
* Use ZLIB and PCRE imported target to improve portability * Set EXPAT and SQLite3 library for XML and SQL if POCO_UNBUNDLED is true in cmake build
This commit is contained in:
committed by
Joerg-Christian Boehme
parent
b878152e90
commit
bd98f5cedf
@@ -28,7 +28,7 @@ set_target_properties(SQLSQLite
|
||||
DEFINE_SYMBOL SQLite_EXPORTS
|
||||
)
|
||||
|
||||
target_link_libraries(SQLSQLite PUBLIC Poco::SQL ${SQLITE3_LIBRARIES}) # TODO(BJoe) Use namespace target
|
||||
target_link_libraries(SQLSQLite PUBLIC Poco::SQL)
|
||||
target_include_directories(SQLSQLite
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
@@ -37,7 +37,7 @@ target_include_directories(SQLSQLite
|
||||
)
|
||||
|
||||
if(POCO_UNBUNDLED)
|
||||
target_include_directories(SQLSQLite PUBLIC "${SQLITE3_INCLUDE_DIRS}")
|
||||
target_link_libraries(SQLSQLite PUBLIC SQLite::SQLite3)
|
||||
target_compile_definitions(SQLSQLite PUBLIC POCO_UNBUNDLED)
|
||||
else()
|
||||
if(WINCE)
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
include(CMakeFindDependencyMacro)
|
||||
find_dependency(PocoFoundation)
|
||||
find_dependency(PocoSQL)
|
||||
if(@POCO_UNBUNDLED@)
|
||||
if(CMAKE_VERSION VERSION_LESS "3.14")
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/V313")
|
||||
endif()
|
||||
find_dependency(SQLite3 REQUIRED)
|
||||
endif()
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/PocoSQLSQLiteTargets.cmake")
|
||||
|
||||
Reference in New Issue
Block a user