cmake: Set public include dir for socket_wrapper_noop target
authorAndreas Schneider <asn@samba.org>
Mon, 15 Mar 2021 07:17:34 +0000 (08:17 +0100)
committerAndreas Schneider <asn@samba.org>
Mon, 15 Mar 2021 07:17:34 +0000 (08:17 +0100)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
src/CMakeLists.txt

index a18ec8b20c6295de25f770263a98a7d9bef82b1e..58829929abc4ca12a5d4eec5f83e367500c54088 100644 (file)
@@ -32,7 +32,10 @@ set(SOCKET_WRAPPER_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_SHARED_LIBRARY_
 add_library(socket_wrapper_noop SHARED socket_wrapper_noop.c)
 target_include_directories(socket_wrapper_noop
                            PRIVATE
-                               ${CMAKE_BINARY_DIR})
+                               ${socket_wrapper_BINARY_DIR}
+                           PUBLIC
+                               $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
+                               $<INSTALL_INTERFACE:include>)
 target_compile_options(socket_wrapper_noop
                        PRIVATE
                           ${DEFAULT_C_COMPILE_FLAGS}