aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2019-11-05 08:50:12 +0100
committerAndreas Schneider <asn@cryptomilk.org>2019-11-05 08:50:12 +0100
commit8ad5c768d4481eba6b4704812d3afb5c8c36de8f (patch)
treeabad425b73a13a59f62eb2b64e264f480d42af6c
parentd02c06268eae9c9c5253bd88410863a2e8c66587 (diff)
downloadlibssh-8ad5c768d4481eba6b4704812d3afb5c8c36de8f.tar.gz
libssh-8ad5c768d4481eba6b4704812d3afb5c8c36de8f.tar.xz
libssh-8ad5c768d4481eba6b4704812d3afb5c8c36de8f.zip
cmake: Use target_include_directories()
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r--src/CMakeLists.txt9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 0c153ad3..1a2036f0 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -295,11 +295,6 @@ if (NOT WITH_NACL)
endif (NOT HAVE_OPENSSL_ED25519)
endif (NOT WITH_NACL)
-include_directories(
- ${LIBSSH_PUBLIC_INCLUDE_DIRS}
- ${LIBSSH_PRIVATE_INCLUDE_DIRS}
-)
-
# Set the path to the default map file
set(MAP_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.map")
@@ -336,6 +331,8 @@ target_compile_options(${LIBSSH_SHARED_LIBRARY}
PRIVATE
${DEFAULT_C_COMPILE_FLAGS}
-D_GNU_SOURCE)
+target_include_directories(${LIBSSH_SHARED_LIBRARY}
+ PRIVATE ${LIBSSH_PUBLIC_INCLUDE_DIRS} ${LIBSSH_PRIVATE_INCLUDE_DIRS})
target_link_libraries(${LIBSSH_SHARED_LIBRARY}
PRIVATE ${LIBSSH_LINK_LIBRARIES})
@@ -390,6 +387,8 @@ if (BUILD_STATIC_LIB)
${DEFAULT_C_COMPILE_FLAGS}
-D_GNU_SOURCE)
+ target_include_directories(${LIBSSH_STATIC_LIBRARY}
+ PRIVATE ${LIBSSH_PUBLIC_INCLUDE_DIRS} ${LIBSSH_PRIVATE_INCLUDE_DIRS})
target_link_libraries(${LIBSSH_STATIC_LIBRARY}
PUBLIC ${LIBSSH_LINK_LIBRARIES})