diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:25:12 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:25:12 +0000 |
commit | 827a4c3faa27e0c186452585b15094eee1119085 (patch) | |
tree | e6a08b0c767863d66f7d4a9de80db5edc7db29be /libfreerdp/CMakeLists.txt | |
parent | Releasing progress-linux version 3.3.0+dfsg1-1~progress7.99u1. (diff) | |
download | freerdp3-827a4c3faa27e0c186452585b15094eee1119085.tar.xz freerdp3-827a4c3faa27e0c186452585b15094eee1119085.zip |
Merging upstream version 3.5.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'libfreerdp/CMakeLists.txt')
-rw-r--r-- | libfreerdp/CMakeLists.txt | 66 |
1 files changed, 11 insertions, 55 deletions
diff --git a/libfreerdp/CMakeLists.txt b/libfreerdp/CMakeLists.txt index 5b47d98..54c9cd1 100644 --- a/libfreerdp/CMakeLists.txt +++ b/libfreerdp/CMakeLists.txt @@ -21,15 +21,6 @@ set(MODULE_PREFIX "FREERDP") # CMake modules includes include(FindCairo) -# Create imported targets for Intel IPP libraries - -if(IPP_FOUND) - foreach(ipp_lib ${IPP_LIBRARIES}) - add_library("${ipp_lib}_imported" STATIC IMPORTED) - set_property(TARGET "${ipp_lib}_imported" PROPERTY IMPORTED_LOCATION "${IPP_LIBRARY_DIRS}/${ipp_lib}") - endforeach() -endif() - set(LIBFREERDP_DIR ${CMAKE_CURRENT_SOURCE_DIR}) set(LIBFREERDP_SRCS "") set(LIBFREERDP_LIBS "") @@ -376,15 +367,6 @@ set(PRIMITIVES_OPT_SRCS ${PRIMITIVES_SSSE3_SRCS} ${PRIMITIVES_OPENCL_SRCS}) -### IPP Variable debugging -if(WITH_IPP) - if(CMAKE_COMPILER_IS_GNUCC OR ${CMAKE_C_COMPILER_ID} STREQUAL "Clang") - foreach(INCLDIR ${IPP_INCLUDE_DIRS}) - set(OPTIMIZATION "${OPTIMIZATION} -I${INCLDIR}") - endforeach(INCLDIR) - endif() -endif() - if(WITH_SSE2) if(CMAKE_COMPILER_IS_GNUCC OR ${CMAKE_C_COMPILER_ID} STREQUAL "Clang") set_source_files_properties(${PRIMITIVES_SSE2_SRCS} @@ -413,13 +395,6 @@ set(PRIMITIVES_SRCS ${PRIMITIVES_SRCS} ${PRIMITIVES_OPT_SRCS}) freerdp_module_add(${PRIMITIVES_SRCS}) -if(IPP_FOUND) - freerdp_include_directory_add(${IPP_INCLUDE_DIRS}) - foreach(ipp_lib ${IPP_LIBRARIES}) - freerdp_library_add("${ipp_lib}_imported") - endforeach() -endif() - if(BUILD_TESTING AND NOT WIN32 AND NOT APPLE) add_subdirectory(primitives/test) endif() @@ -430,37 +405,13 @@ endif() list(APPEND LIBFREERDP_PUB_LIBS winpr) list(REMOVE_DUPLICATES LIBFREERDP_DEFINITIONS) -list(REMOVE_DUPLICATES LIBFREERDP_LIBS) -list(REMOVE_DUPLICATES LIBFREERDP_PUB_LIBS) list(REMOVE_DUPLICATES LIBFREERDP_INCLUDES) include_directories(${LIBFREERDP_INCLUDES}) -# On windows create dll version information. -# Vendor, product and year are already set in top level CMakeLists.txt -if (WIN32) - set (RC_VERSION_MAJOR ${FREERDP_VERSION_MAJOR}) - set (RC_VERSION_MINOR ${FREERDP_VERSION_MINOR}) - set (RC_VERSION_BUILD ${FREERDP_VERSION_REVISION}) - set (RC_VERSION_FILE "${CMAKE_SHARED_LIBRARY_PREFIX}${MODULE_NAME}${FREERDP_API_VERSION}${CMAKE_SHARED_LIBRARY_SUFFIX}" ) +AddTargetWithResourceFile(${MODULE_NAME} FALSE "${FREERDP_VERSION}" LIBFREERDP_SRCS) - configure_file( - ${PROJECT_SOURCE_DIR}/cmake/WindowsDLLVersion.rc.in - ${CMAKE_CURRENT_BINARY_DIR}/version.rc - @ONLY) - - set (LIBFREERDP_SRCS ${LIBFREERDP_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/version.rc) -endif() - -add_library(${MODULE_NAME} ${LIBFREERDP_SRCS}) add_definitions(${LIBFREERDP_DEFINITIONS}) -set_target_properties(${MODULE_NAME} PROPERTIES LINKER_LANGUAGE C) -set_target_properties(${MODULE_NAME} PROPERTIES OUTPUT_NAME ${MODULE_NAME}${FREERDP_VERSION_MAJOR}) - -if (WITH_LIBRARY_VERSIONING) - set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION}) -endif() - target_include_directories(${MODULE_NAME} INTERFACE $<INSTALL_INTERFACE:include>) target_link_libraries(${MODULE_NAME} PRIVATE ${LIBFREERDP_LIBS}) target_link_libraries(${MODULE_NAME} PUBLIC ${LIBFREERDP_PUB_LIBS}) @@ -469,14 +420,19 @@ install(TARGETS ${MODULE_NAME} COMPONENT libraries EXPORT FreeRDPTargets LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) -if (WITH_DEBUG_SYMBOLS AND MSVC AND BUILD_SHARED_LIBS) - get_target_property(OUTPUT_FILENAME ${MODULE_NAME} OUTPUT_NAME) - install(FILES ${CMAKE_PDB_BINARY_DIR}/${OUTPUT_FILENAME}.pdb DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT symbols) -endif() - set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP/libfreerdp") include(pkg-config-install-prefix) +set(FREERDP_REQUIRES_PRIVATE "") +if(cJSON_FOUND) + string(APPEND FREERDP_REQUIRES_PRIVATE " libcjson") + list(APPEND FREERDP_PC_PRIVATE_LIBS "-lcjson") +endif() +if(WITH_SMARTCARD_EMULATE) + string(APPEND FREERDP_REQUIRES_PRIVATE " zlib") + list(APPEND FREERDP_PC_PRIVATE_LIBS "-lz") +endif() +list(JOIN FREERDP_PC_PRIVATE_LIBS " " FREERDP_PC_PRIVATE_LIBS) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/freerdp.pc.in ${CMAKE_CURRENT_BINARY_DIR}/freerdp${FREERDP_VERSION_MAJOR}.pc @ONLY) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/freerdp${FREERDP_VERSION_MAJOR}.pc DESTINATION ${PKG_CONFIG_PC_INSTALL_DIR}) |