blob: 907b54e77001e2a46f69da40f81e7fe6c2d14e9f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
diff --git a/cmake/SociBackend.cmake b/cmake/SociBackend.cmake
index 442d81d..ef56422 100644
--- a/cmake/SociBackend.cmake
+++ b/cmake/SociBackend.cmake
@@ -159,8 +159,13 @@ macro(soci_backend NAME)
${THIS_BACKEND_HEADERS})
target_link_libraries(${THIS_BACKEND_TARGET}
+ PUBLIC
${SOCI_CORE_TARGET}
${THIS_BACKEND_DEPENDS_LIBRARIES})
+
+ target_include_directories(${THIS_BACKEND_TARGET}
+ PUBLIC
+ ${THIS_BACKEND_DEPENDS_INCLUDE_DIRS})
if(WIN32)
set_target_properties(${THIS_BACKEND_TARGET}
@@ -197,8 +202,14 @@ macro(soci_backend NAME)
# Still need to link the libraries for tests to work
target_link_libraries (${THIS_BACKEND_TARGET_STATIC}
+ PUBLIC
${THIS_BACKEND_DEPENDS_LIBRARIES}
)
+
+ target_include_directories(${THIS_BACKEND_TARGET_STATIC}
+ PUBLIC
+ ${THIS_BACKEND_DEPENDS_INCLUDE_DIRS}
+ )
set_target_properties(${THIS_BACKEND_TARGET_STATIC}
PROPERTIES
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 3916cce..d537613 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -64,6 +64,7 @@ if (SOCI_SHARED)
target_include_directories(${SOCI_CORE_TARGET}
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../../include>
+ $<INSTALL_INTERFACE:include>
)
endif()
@@ -96,6 +97,7 @@ if (SOCI_STATIC)
target_include_directories(${SOCI_CORE_TARGET_STATIC}
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../../include>
+ $<INSTALL_INTERFACE:include>
)
endif()
|