Commit 3db8f437 authored by Maciej Cencora's avatar Maciej Cencora

cmake: export SOCI public include directories

Useful for projects that build and link with SOCI inside their
source trees.
parent e4ab099d
......@@ -60,6 +60,12 @@ if (SOCI_SHARED)
INSTALL_NAME_DIR ${CMAKE_INSTALL_PREFIX}/lib
CLEAN_DIRECT_OUTPUT 1)
endif()
target_include_directories(${SOCI_CORE_TARGET}
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../../include>
)
endif()
# This adds definitions to all build configurations. SOCI_DEBUG_POSTFIX is passed to soci library
......@@ -86,8 +92,17 @@ if (SOCI_STATIC)
OUTPUT_NAME ${SOCI_CORE_TARGET_OUTPUT_NAME}
PREFIX "lib"
CLEAN_DIRECT_OUTPUT 1)
target_include_directories(${SOCI_CORE_TARGET_STATIC}
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../../include>
)
endif()
#
# Core installation
#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment