diff options
Diffstat (limited to 'client/X11/CMakeLists.txt')
-rw-r--r-- | client/X11/CMakeLists.txt | 65 |
1 files changed, 23 insertions, 42 deletions
diff --git a/client/X11/CMakeLists.txt b/client/X11/CMakeLists.txt index 099d00d..bf7c842 100644 --- a/client/X11/CMakeLists.txt +++ b/client/X11/CMakeLists.txt @@ -21,7 +21,7 @@ if (NOT FREERDP_DEFAULT_PROJECT_VERSION) set(FREERDP_DEFAULT_PROJECT_VERSION "1.0.0.0") endif() -project(xfreerdp +project(xfreerdp-client LANGUAGES C VERSION ${FREERDP_DEFAULT_PROJECT_VERSION} ) @@ -84,29 +84,14 @@ if (CHANNEL_TSMF_CLIENT) ) endif() -if(WITH_CLIENT_INTERFACE) - if(CLIENT_INTERFACE_SHARED) - add_library(${PROJECT_NAME} SHARED ${SRCS}) - if (WITH_LIBRARY_VERSIONING) - set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION}) - endif() - else() - add_library(${PROJECT_NAME} ${SRCS}) - endif() - target_include_directories(${PROJECT_NAME} INTERFACE $<INSTALL_INTERFACE:include>) - +if(CLIENT_INTERFACE_SHARED) + AddTargetWithResourceFile(${PROJECT_NAME} "SHARED" "${PROJECT_VERSION}" SRCS) else() - list(APPEND SRCS - cli/xfreerdp.c xfreerdp.h - ) - add_executable(${PROJECT_NAME} ${SRCS}) - if (WITH_BINARY_VERSIONING) - set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "${PROJECT_NAME}${PROJECT_VERSION_MAJOR}") - endif() - include_directories(..) + AddTargetWithResourceFile(${PROJECT_NAME} "STATIC" "${PROJECT_VERSION}" SRCS) endif() +target_include_directories(${PROJECT_NAME} INTERFACE $<INSTALL_INTERFACE:include>) -set(LIBS +set(PRIV_LIBS ${X11_LIBRARIES} ) @@ -116,7 +101,7 @@ find_package(X11 REQUIRED) if(X11_XShm_FOUND) add_definitions(-DWITH_XSHM) include_directories(${X11_XShm_INCLUDE_PATH}) - list(APPEND LIBS + list(APPEND PRIV_LIBS ${X11_Xext_LIB} ) endif() @@ -128,7 +113,7 @@ if (WITH_XINERAMA) if(X11_Xinerama_FOUND) add_definitions(-DWITH_XINERAMA) include_directories(${X11_Xinerama_INCLUDE_PATH}) - list(APPEND LIBS + list(APPEND PRIV_LIBS ${X11_Xinerama_LIB} ) endif() @@ -139,7 +124,7 @@ if (WITH_XEXT) find_package(X11 REQUIRED) if(X11_Xext_FOUND) add_definitions(-DWITH_XEXT) - list(APPEND LIBS + list(APPEND PRIV_LIBS ${X11_Xext_LIB} ) endif() @@ -151,7 +136,7 @@ if (WITH_XCURSOR) if(X11_Xcursor_FOUND) add_definitions(-DWITH_XCURSOR) include_directories(${X11_Xcursor_INCLUDE_PATH}) - list(APPEND LIBS + list(APPEND PRIV_LIBS ${X11_Xcursor_LIB} ) endif() @@ -163,7 +148,7 @@ if (WITH_XV) if(X11_Xv_FOUND) add_definitions(-DWITH_XV) include_directories(${X11_Xv_INCLUDE_PATH}) - list(APPEND LIBS + list(APPEND PRIV_LIBS ${X11_Xv_LIB} ) endif() @@ -175,7 +160,7 @@ if (WITH_XI) if(X11_Xi_FOUND) add_definitions(-DWITH_XI) include_directories(${X11_Xi_INCLUDE_PATH}) - list(APPEND LIBS + list(APPEND PRIV_LIBS ${X11_Xi_LIB} ) endif() @@ -187,7 +172,7 @@ if(WITH_XRENDER) if(X11_Xrender_FOUND) add_definitions(-DWITH_XRENDER) include_directories(${X11_Xrender_INCLUDE_PATH}) - list(APPEND LIBS + list(APPEND PRIV_LIBS ${X11_Xrender_LIB} ) endif() @@ -199,7 +184,7 @@ if (WITH_XRANDR) if(X11_Xrandr_FOUND) add_definitions(-DWITH_XRANDR) include_directories(${X11_Xrandr_INCLUDE_PATH}) - list(APPEND LIBS + list(APPEND PRIV_LIBS ${X11_Xrandr_LIB} ) endif() @@ -211,7 +196,7 @@ if (WITH_XFIXES) if(X11_Xfixes_FOUND) add_definitions(-DWITH_XFIXES) include_directories(${X11_Xfixes_INCLUDE_PATH}) - list(APPEND LIBS + list(APPEND PRIV_LIBS ${X11_Xfixes_LIB} ) endif() @@ -219,27 +204,23 @@ endif() include_directories(${PROJECT_SOURCE_DIR}/resources) -list(APPEND LIBS +list(APPEND PUB_LIBS freerdp-client - freerdp +) + +list(APPEND PRIV_LIBS m ) if (NOT APPLE) - list(APPEND LIBS rt) + list(APPEND PRIV_LIBS rt) endif() -target_link_libraries(${PROJECT_NAME} PRIVATE ${LIBS}) +target_link_libraries(${PROJECT_NAME} PUBLIC ${PUB_LIBS}) +target_link_libraries(${PROJECT_NAME} PRIVATE ${PRIV_LIBS}) -if(WITH_IPP) - target_link_libraries(${PROJECT_NAME} PRIVATE ${IPP_LIBRARY_LIST}) -endif() - -option(WITH_CLIENT_INTERFACE "Build clients as a library with an interface" OFF) if(WITH_CLIENT_INTERFACE) install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries) - add_subdirectory(cli) -else() - install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT client) endif() +add_subdirectory(cli) set_property(TARGET ${PROJECT_NAME} PROPERTY FOLDER "Client/X11") |