From 5ecc011c136207c6d4698f1d445a9e5b1bc215f2 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Tue, 1 Aug 2023 09:07:39 +0200 Subject: [PATCH] Export interface include directories --- channels/CMakeLists.txt | 3 +++ client/Windows/CMakeLists.txt | 1 + client/X11/CMakeLists.txt | 1 + client/common/CMakeLists.txt | 1 + libfreerdp/CMakeLists.txt | 1 + rdtk/librdtk/CMakeLists.txt | 1 + server/Windows/CMakeLists.txt | 1 + server/common/CMakeLists.txt | 1 + server/proxy/CMakeLists.txt | 1 + server/shadow/CMakeLists.txt | 2 ++ uwac/libuwac/CMakeLists.txt | 1 + winpr/libwinpr/CMakeLists.txt | 1 + winpr/tools/CMakeLists.txt | 1 + 13 files changed, 16 insertions(+) diff --git a/channels/CMakeLists.txt b/channels/CMakeLists.txt index 70c08999e..4e3fe74e1 100644 --- a/channels/CMakeLists.txt +++ b/channels/CMakeLists.txt @@ -162,6 +162,9 @@ endmacro(add_channel_client_subsystem) macro(channel_install _targets _destination _export_target) if (NOT BUILD_SHARED_LIBS) + foreach(_target_name IN ITEMS ${_targets}) + target_include_directories(${_target_name} INTERFACE $) + endforeach() install(TARGETS ${_targets} DESTINATION ${_destination} EXPORT ${_export_target}) endif() endmacro(channel_install) diff --git a/client/Windows/CMakeLists.txt b/client/Windows/CMakeLists.txt index bf7bd6e83..a86a3c081 100644 --- a/client/Windows/CMakeLists.txt +++ b/client/Windows/CMakeLists.txt @@ -88,6 +88,7 @@ if(WITH_CLIENT_INTERFACE) set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION}) endif() set_target_properties(${MODULE_NAME} PROPERTIES OUTPUT_NAME ${MODULE_NAME}${FREERDP_API_VERSION}) + target_include_directories(${MODULE_NAME} INTERFACE $) else() set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} cli/wfreerdp.c cli/wfreerdp.h) add_executable(${MODULE_NAME} ${WIN32_GUI_FLAG} ${${MODULE_PREFIX}_SRCS}) diff --git a/client/X11/CMakeLists.txt b/client/X11/CMakeLists.txt index e35fc3900..903262608 100644 --- a/client/X11/CMakeLists.txt +++ b/client/X11/CMakeLists.txt @@ -94,6 +94,7 @@ if(WITH_CLIENT_INTERFACE) else() add_library(${PROJECT_NAME} ${SRCS}) endif() + target_include_directories(${PROJECT_NAME} INTERFACE $) else() list(APPEND SRCS diff --git a/client/common/CMakeLists.txt b/client/common/CMakeLists.txt index 709f59ef4..322131dfe 100644 --- a/client/common/CMakeLists.txt +++ b/client/common/CMakeLists.txt @@ -98,6 +98,7 @@ endif() list(APPEND LIBS freerdp winpr) +target_include_directories(${MODULE_NAME} INTERFACE $) target_link_libraries(${MODULE_NAME} PRIVATE ${FREERDP_CHANNELS_CLIENT_LIBS}) target_link_libraries(${MODULE_NAME} PUBLIC ${LIBS}) diff --git a/libfreerdp/CMakeLists.txt b/libfreerdp/CMakeLists.txt index 3bfe3f628..8b015413c 100644 --- a/libfreerdp/CMakeLists.txt +++ b/libfreerdp/CMakeLists.txt @@ -419,6 +419,7 @@ if (WITH_LIBRARY_VERSIONING) set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION}) endif() +target_include_directories(${MODULE_NAME} INTERFACE $) target_link_libraries(${MODULE_NAME} PRIVATE ${LIBFREERDP_LIBS}) if (LIBFREERDP_PUB_LIBS) target_link_libraries(${MODULE_NAME} PUBLIC ${LIBFREERDP_PUB_LIBS} winpr) diff --git a/rdtk/librdtk/CMakeLists.txt b/rdtk/librdtk/CMakeLists.txt index 0fc17dd3c..d85a7f7b1 100644 --- a/rdtk/librdtk/CMakeLists.txt +++ b/rdtk/librdtk/CMakeLists.txt @@ -56,6 +56,7 @@ add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) list(APPEND ${MODULE_PREFIX}_LIBS winpr) +target_include_directories(${MODULE_NAME} INTERFACE $) target_link_libraries(${MODULE_NAME} PRIVATE ${${MODULE_PREFIX}_LIBS}) set_target_properties(${MODULE_NAME} PROPERTIES LINKER_LANGUAGE C) diff --git a/server/Windows/CMakeLists.txt b/server/Windows/CMakeLists.txt index 379b96f22..b069aee68 100644 --- a/server/Windows/CMakeLists.txt +++ b/server/Windows/CMakeLists.txt @@ -82,6 +82,7 @@ if(WITH_SERVER_INTERFACE) if (WITH_LIBRARY_VERSIONING) set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION}) endif() + target_include_directories(${MODULE_NAME} INTERFACE $) else() set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} cli/wfreerdp.c cli/wfreerdp.h) add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) diff --git a/server/common/CMakeLists.txt b/server/common/CMakeLists.txt index 12765f2ee..5552688c3 100644 --- a/server/common/CMakeLists.txt +++ b/server/common/CMakeLists.txt @@ -60,6 +60,7 @@ if (WITH_LIBRARY_VERSIONING) set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION}) endif() +target_include_directories(${MODULE_NAME} INTERFACE $) target_link_libraries(${MODULE_NAME} PRIVATE ${FREERDP_CHANNELS_SERVER_LIBS}) target_link_libraries(${MODULE_NAME} PUBLIC winpr freerdp) diff --git a/server/proxy/CMakeLists.txt b/server/proxy/CMakeLists.txt index 4a23a4f57..93beb07b4 100644 --- a/server/proxy/CMakeLists.txt +++ b/server/proxy/CMakeLists.txt @@ -81,6 +81,7 @@ set(PUBLIC_LIBS freerdp ) +target_include_directories(${MODULE_NAME} INTERFACE $) target_link_libraries(${MODULE_NAME} PRIVATE ${PRIVATE_LIBS} PUBLIC ${PUBLIC_LIBS}) install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT server EXPORT FreeRDP-ProxyTargets) if (WITH_DEBUG_SYMBOLS AND MSVC) diff --git a/server/shadow/CMakeLists.txt b/server/shadow/CMakeLists.txt index 467a88969..c08f7217a 100644 --- a/server/shadow/CMakeLists.txt +++ b/server/shadow/CMakeLists.txt @@ -91,6 +91,7 @@ list(APPEND LIBS rdtk ) +target_include_directories(${MODULE_NAME} INTERFACE $) target_link_libraries(${MODULE_NAME} PRIVATE ${LIBS}) set_target_properties(${MODULE_NAME} PROPERTIES OUTPUT_NAME ${MODULE_NAME}${FREERDP_VERSION_MAJOR}) @@ -148,6 +149,7 @@ list(APPEND LIBS winpr ) +target_include_directories(${MODULE_NAME} INTERFACE $) target_link_libraries(${MODULE_NAME} PRIVATE ${LIBS}) set_target_properties(${MODULE_NAME} PROPERTIES OUTPUT_NAME ${MODULE_NAME}${FREERDP_API_VERSION}) diff --git a/uwac/libuwac/CMakeLists.txt b/uwac/libuwac/CMakeLists.txt index 64a0f71d6..7295136d9 100644 --- a/uwac/libuwac/CMakeLists.txt +++ b/uwac/libuwac/CMakeLists.txt @@ -77,6 +77,7 @@ if (WITH_LIBRARY_VERSIONING) set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${UWAC_VERSION} SOVERSION ${UWAC_API_VERSION}) endif() +target_include_directories(${MODULE_NAME} INTERFACE $) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS} PRIVATE ${WAYLAND_LIBS} ${XKBCOMMON_LIBS} ${EPOLLSHIM_LIBS}) if (UWAC_HAVE_PIXMAN_REGION) target_link_libraries(${MODULE_NAME} PRIVATE ${pixman_LINK_LIBRARIES}) diff --git a/winpr/libwinpr/CMakeLists.txt b/winpr/libwinpr/CMakeLists.txt index ea653bb59..b4a45f660 100644 --- a/winpr/libwinpr/CMakeLists.txt +++ b/winpr/libwinpr/CMakeLists.txt @@ -179,6 +179,7 @@ else() endif() target_link_options(${MODULE_NAME} ${LINK_OPTS_MODE} ${WINPR_LINK_OPTIONS}) target_include_directories(${MODULE_NAME} PRIVATE ${WINPR_INCLUDES}) +target_include_directories(${MODULE_NAME} INTERFACE $) target_link_directories(${MODULE_NAME} PRIVATE ${WINPR_LINK_DIRS}) target_compile_options(${MODULE_NAME} PRIVATE ${WINPR_COMPILE_OPTIONS}) target_compile_definitions(${MODULE_NAME} PRIVATE ${WINPR_DEFINITIONS}) diff --git a/winpr/tools/CMakeLists.txt b/winpr/tools/CMakeLists.txt index db9c30355..8a8aabec3 100644 --- a/winpr/tools/CMakeLists.txt +++ b/winpr/tools/CMakeLists.txt @@ -110,6 +110,7 @@ if (WITH_LIBRARY_VERSIONING) endif() add_definitions(${WINPR_DEFINITIONS}) +target_include_directories(${MODULE_NAME} INTERFACE $) target_link_libraries(${MODULE_NAME} PRIVATE ${WINPR_TOOLS_LIBS}) install(TARGETS ${MODULE_NAME} COMPONENT libraries EXPORT WinPRTargets