diff options
Diffstat (limited to 'server/Windows/CMakeLists.txt')
-rw-r--r-- | server/Windows/CMakeLists.txt | 39 |
1 files changed, 3 insertions, 36 deletions
diff --git a/server/Windows/CMakeLists.txt b/server/Windows/CMakeLists.txt index 2744b65..20f1518 100644 --- a/server/Windows/CMakeLists.txt +++ b/server/Windows/CMakeLists.txt @@ -61,37 +61,12 @@ if(CHANNEL_RDPSND AND WITH_RDPSND_DSOUND) )
endif()
-# On windows create dll version information.
-# Vendor, product and year are already set in top level CMakeLists.txt
-set (RC_VERSION_MAJOR ${FREERDP_VERSION_MAJOR})
-set (RC_VERSION_MINOR ${FREERDP_VERSION_MINOR})
-set (RC_VERSION_BUILD ${FREERDP_VERSION_REVISION})
if(WITH_SERVER_INTERFACE)
- set (RC_VERSION_FILE "${CMAKE_SHARED_LIBRARY_PREFIX}${MODULE_NAME}${FREERDP_API_VERSION}${CMAKE_SHARED_LIBRARY_SUFFIX}" )
-else()
- set (RC_VERSION_FILE "${MODULE_NAME}${CMAKE_EXECUTABLE_SUFFIX}" )
-endif()
-
-configure_file(
- ${PROJECT_SOURCE_DIR}/cmake/WindowsDLLVersion.rc.in
- ${CMAKE_CURRENT_BINARY_DIR}/version.rc
- @ONLY)
-
-set (${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/version.rc)
-
-if(WITH_SERVER_INTERFACE)
- add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
- set_target_properties(${MODULE_NAME} PROPERTIES OUTPUT_NAME ${MODULE_NAME}${FREERDP_API_VERSION})
- if (WITH_LIBRARY_VERSIONING)
- set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION})
- endif()
+ AddTargetWithResourceFile(${MODULE_NAME} FALSE "${FREERDP_VERSION}" ${MODULE_PREFIX}_SRCS)
target_include_directories(${MODULE_NAME} INTERFACE $<INSTALL_INTERFACE:include>)
else()
- set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} cli/wfreerdp.c cli/wfreerdp.h)
- add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
- if (WITH_BINARY_VERSIONING)
- set_target_properties(${MODULE_NAME} PROPERTIES OUTPUT_NAME "${MODULE_NAME}${FREERDP_API_VERSION}")
- endif()
+ list(APPEND ${MODULE_PREFIX}_SRCS cli/wfreerdp.c cli/wfreerdp.h)
+ AddTargetWithResourceFile(${MODULE_NAME} TRUE "${FREERDP_VERSION}" ${MODULE_PREFIX}_SRCS)
endif()
@@ -109,16 +84,8 @@ if(WITH_SERVER_INTERFACE) ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
-
- if (WITH_DEBUG_SYMBOLS AND MSVC AND BUILD_SHARED_LIBS)
- install(FILES ${PROJECT_BINARY_DIR}/${MODULE_NAME}${FREERDP_VERSION_MAJOR}.pdb DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT symbols)
- endif()
else()
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT server)
-
- if (WITH_DEBUG_SYMBOLS AND MSVC)
- install(FILES ${PROJECT_BINARY_DIR}/${MODULE_NAME}.pdb DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT symbols)
- endif()
endif()
if(WITH_SERVER_INTERFACE)
|