mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-12 10:13:51 +01:00
fix(build): Data libs CMakeLists #4453
This commit is contained in:
parent
b82fca8337
commit
c990b9f890
@ -38,14 +38,24 @@ if (NOT POCO_DATA_NO_SQL_PARSER)
|
||||
target_compile_definitions(Data PUBLIC -DSQLParser_EXPORTS)
|
||||
endif()
|
||||
target_link_libraries(Data PUBLIC Poco::Foundation)
|
||||
target_include_directories(Data
|
||||
|
||||
if(NOT POCO_DATA_NO_SQL_PARSER)
|
||||
target_include_directories(Data
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
|
||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/SQLParser/src
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/SQLParser
|
||||
)
|
||||
else()
|
||||
target_include_directories(Data
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/SQLParser/src>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/SQLParser>
|
||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
||||
)
|
||||
)
|
||||
endif()
|
||||
|
||||
POCO_INSTALL(Data)
|
||||
POCO_GENERATE_PACKAGE(Data)
|
||||
|
@ -28,4 +28,11 @@ else()
|
||||
endif()
|
||||
target_link_libraries(Data-testrunner PUBLIC Poco::DataTest Poco::Data CppUnit)
|
||||
|
||||
if(NOT POCO_DATA_NO_SQL_PARSER)
|
||||
target_include_directories(Data-testrunner
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../SQLParser/src
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../SQLParser
|
||||
)
|
||||
endif()
|
||||
|
||||
add_subdirectory(DataTest)
|
||||
|
Loading…
Reference in New Issue
Block a user