Merge pull request #1823 from akallabeth/cmake-library-noversion

Build library without SOVERSION
This commit is contained in:
Bernhard Miklautz 2014-07-11 13:21:12 +02:00
commit 97fec44eed
29 changed files with 90 additions and 26 deletions

View File

@ -59,6 +59,7 @@ include(GNUInstallDirsWrapper)
include(CMakePackageConfigHelpers)
# Soname versioning
set(WITH_LIBRARY_VERSIONING "ON")
set(FREERDP_VERSION_MAJOR "1")
set(FREERDP_VERSION_MINOR "2")
set(FREERDP_VERSION_REVISION "0")
@ -301,6 +302,8 @@ endif(APPLE)
# Android
if(ANDROID)
set(WITH_LIBRARY_VERSIONING "OFF")
if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
add_definitions(-DNDK_DEBUG=1)

View File

@ -30,7 +30,10 @@ endforeach()
add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS})
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION} PREFIX "lib")
if (WITH_LIBRARY_VERSIONING)
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION})
endif()
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "lib")
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
MONOLITHIC ${MONOLITHIC_BUILD}

View File

@ -62,7 +62,7 @@ if(WITH_GSTREAMER_0_10 OR WITH_GSTREAMER_1_0)
find_feature(XRandR ${XRANDR_FEATURE_TYPE} ${XRANDR_FEATURE_PURPOSE} ${XRANDR_FEATURE_DESCRIPTION})
if (WITH_XRANDR)
add_channel_client_subsystem(${MODULE_PREFIX} ${CHANNEL_NAME} "gstreamer" "decoder")
else()
else()
message(WARNING "Disabling tsmf gstreamer because XRandR wasn't found")
endif()
endif()

View File

@ -50,7 +50,10 @@ if(WITH_CLIENT_INTERFACE)
else()
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
endif()
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION} PREFIX "lib")
if (WITH_LIBRARY_VERSIONING)
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION})
endif()
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "lib")
else()
set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} cli/wfreerdp.c cli/wfreerdp.h)
add_executable(${MODULE_NAME} WIN32 ${${MODULE_PREFIX}_SRCS})

View File

@ -59,7 +59,10 @@ if(WITH_CLIENT_INTERFACE)
else()
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
endif()
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION} PREFIX "lib")
if (WITH_LIBRARY_VERSIONING)
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION})
endif()
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "lib")
else()
set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} cli/xfreerdp.c cli/xfreerdp.h)
add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})

View File

@ -47,7 +47,10 @@ add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
include_directories(${OPENSSL_INCLUDE_DIR})
include_directories(${ZLIB_INCLUDE_DIRS})
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION} PREFIX "lib")
if (WITH_LIBRARY_VERSIONING)
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION})
endif()
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "lib")
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS}
${FREERDP_CHANNELS_CLIENT_LIBS})

View File

@ -56,7 +56,10 @@ if(MONOLITHIC_BUILD)
${${MODULE_PREFIX}_OBJECTS})
set_target_properties(${MODULE_NAME} PROPERTIES LINKER_LANGUAGE C)
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION} PREFIX "lib")
if (WITH_LIBRARY_VERSIONING)
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION})
endif()
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "lib")
list(APPEND FREERDP_LIBS ${PROFILER_LIBRARIES})
list(REMOVE_DUPLICATES FREERDP_LIBS)

View File

@ -33,7 +33,10 @@ add_complex_library(MODULE ${MODULE_NAME} TYPE "OBJECT"
SOURCES ${${MODULE_PREFIX}_SRCS}
EXPORT)
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION} PREFIX "lib")
if (WITH_LIBRARY_VERSIONING)
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION})
endif()
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "lib")
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
MONOLITHIC ${MONOLITHIC_BUILD} INTERNAL

View File

@ -98,7 +98,10 @@ add_complex_library(MODULE ${MODULE_NAME} TYPE "OBJECT"
SOURCES ${${MODULE_PREFIX}_SRCS}
EXPORT)
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION} PREFIX "lib")
if (WITH_LIBRARY_VERSIONING)
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION})
endif()
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "lib")
set(${MODULE_PREFIX}_LIBS
${FREERDP_JPEG_LIBS}

View File

@ -30,8 +30,11 @@ add_complex_library(MODULE ${MODULE_NAME} TYPE "OBJECT"
include_directories(${OPENSSL_INCLUDE_DIR})
include_directories(${ZLIB_INCLUDE_DIRS})
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib")
if (WITH_LIBRARY_VERSIONING)
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION})
endif()
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "lib")
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS}
${OPENSSL_LIBRARIES} ${ZLIB_LIBRARIES})
@ -40,7 +43,7 @@ set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr)
if(MONOLITHIC_BUILD)
set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE)
else()
else()
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} EXPORT FreeRDPTargets)
endif()

View File

@ -130,7 +130,10 @@ add_complex_library(MODULE ${MODULE_NAME} TYPE "OBJECT"
SOURCES ${${MODULE_PREFIX}_SRCS}
EXPORT)
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION} PREFIX "lib")
if (WITH_LIBRARY_VERSIONING)
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION})
endif()
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "lib")
if(WIN32)
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ws2_32)

View File

@ -36,7 +36,10 @@ add_complex_library(MODULE ${MODULE_NAME} TYPE "OBJECT"
include_directories(${OPENSSL_INCLUDE_DIR})
include_directories(${ZLIB_INCLUDE_DIRS})
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION} PREFIX "lib")
if (WITH_LIBRARY_VERSIONING)
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION})
endif()
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "lib")
set(${MODULE_PREFIX}_LIBS
${OPENSSL_LIBRARIES})

View File

@ -44,7 +44,10 @@ add_complex_library(MODULE ${MODULE_NAME} TYPE "OBJECT"
SOURCES ${${MODULE_PREFIX}_SRCS}
EXPORT)
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION} PREFIX "lib")
if (WITH_LIBRARY_VERSIONING)
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION})
endif()
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "lib")
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
MONOLITHIC ${MONOLITHIC_BUILD} INTERNAL

View File

@ -75,7 +75,10 @@ add_complex_library(MODULE ${MODULE_NAME} TYPE "OBJECT"
SOURCES ${${MODULE_PREFIX}_SRCS}
EXPORT)
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION} PREFIX "lib")
if (WITH_LIBRARY_VERSIONING)
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION})
endif()
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "lib")
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
MONOLITHIC ${MONOLITHIC_BUILD} INTERNAL

View File

@ -76,7 +76,10 @@ add_complex_library(MODULE ${MODULE_NAME} TYPE "OBJECT"
SOURCES ${${MODULE_PREFIX}_SRCS}
EXPORT)
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION} PREFIX "lib")
if (WITH_LIBRARY_VERSIONING)
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION})
endif()
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "lib")
if(IPP_FOUND)
include_directories(${IPP_INCLUDE_DIRS})

View File

@ -30,7 +30,10 @@ add_complex_library(MODULE ${MODULE_NAME} TYPE "OBJECT"
SOURCES ${${MODULE_PREFIX}_SRCS}
EXPORT)
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION} PREFIX "lib")
if (WITH_LIBRARY_VERSIONING)
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION})
endif()
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "lib")
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
MONOLITHIC ${MONOLITHIC_BUILD} INTERNAL

View File

@ -42,7 +42,10 @@ add_complex_library(MODULE ${MODULE_NAME} TYPE "OBJECT"
SOURCES ${${MODULE_PREFIX}_SRCS}
EXPORT)
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION} PREFIX "lib")
if (WITH_LIBRARY_VERSIONING)
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION})
endif()
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "lib")
set(${MODULE_PREFIX}_LIBS
${CMAKE_THREAD_LIBS_INIT}

View File

@ -60,7 +60,10 @@ endif()
if(WITH_SERVER_INTERFACE)
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION} PREFIX "lib")
if (WITH_LIBRARY_VERSIONING)
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION})
endif()
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "lib")
else()
set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} cli/wfreerdp.c cli/wfreerdp.h)
add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})

View File

@ -44,7 +44,10 @@ if(WITH_SERVER_INTERFACE)
else()
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
endif()
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION} PREFIX "lib")
if (WITH_LIBRARY_VERSIONING)
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION})
endif()
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "lib")
else()
set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} cli/xfreerdp.c)
add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})

View File

@ -32,7 +32,10 @@ endif()
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION} PREFIX "lib")
if (WITH_LIBRARY_VERSIONING)
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION})
endif()
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "lib")
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS}
${FREERDP_CHANNELS_SERVER_LIBS})

View File

@ -96,7 +96,10 @@ list(REMOVE_DUPLICATES WINPR_INCLUDES)
include_directories(${WINPR_INCLUDES})
add_library(${MODULE_NAME} ${WINPR_SRCS})
set_target_properties(${MODULE_NAME} PROPERTIES LINKER_LANGUAGE C)
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${WINPR_VERSION_FULL} SOVERSION ${WINPR_VERSION} PREFIX "lib")
if (WITH_LIBRARY_VERSIONING)
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${WINPR_VERSION_FULL} SOVERSION ${WINPR_VERSION})
endif()
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "lib")
add_definitions(${WINPR_DEFINITIONS})
target_link_libraries(${MODULE_NAME} ${WINPR_LIBS})
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries EXPORT WinPRTargets)

View File

@ -16,3 +16,4 @@
# limitations under the License.
winpr_module_add(credentials.c)

View File

@ -16,7 +16,7 @@
# limitations under the License.
winpr_module_add(
crypto.c
crypto.c
crypto.h
cert.c)

View File

@ -14,8 +14,9 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
winpr_module_add(handle.c handle.h)
winpr_module_add(handle.c handle.h)
if(${CMAKE_SYSTEM_NAME} MATCHES SunOS)
winpr_library_add(rt)
endif()

View File

@ -39,3 +39,4 @@ if(BUILD_TESTING)
add_subdirectory(test)
endif()

View File

@ -49,3 +49,4 @@ endif()
if(BUILD_TESTING)
add_subdirectory(test)
endif()

View File

@ -54,11 +54,9 @@ winpr_module_add(${${MODULE_PREFIX}_NTLM_SRCS}
${${MODULE_PREFIX}_SCHANNEL_SRCS}
${${MODULE_PREFIX}_SRCS})
winpr_include_directory_add(${ZLIB_INCLUDE_DIRS}
${OPENSSL_INCLUDE_DIR})
winpr_library_add(${ZLIB_LIBRARIES}
${OPENSSL_LIBRARIES})

View File

@ -24,3 +24,4 @@ endif()
if(BUILD_TESTING)
add_subdirectory(test)
endif()

View File

@ -101,3 +101,4 @@ endif()
if(BUILD_TESTING)
add_subdirectory(test)
endif()