# HG changeset patch # User Sebastien Jodogne # Date 1381486015 -7200 # Node ID 84011417321d2c18b3c72343102d046e00c9cb68 # Parent 851b6a19a81c5ed8caa013de76491e0e9f4ca5cd better version handling diff -r 851b6a19a81c -r 84011417321d CMakeLists.txt --- a/CMakeLists.txt Thu Oct 10 15:08:01 2013 +0200 +++ b/CMakeLists.txt Fri Oct 11 12:06:55 2013 +0200 @@ -340,15 +340,20 @@ endif() - # Set the version of the shared library for releases - string(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+$" ORTHANC_IS_RELEASE ${ORTHANC_VERSION}) - if (ORTHANC_IS_RELEASE) - string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.([0-9]+)$" "\\1.\\2" ORTHANC_RELEASE ${ORTHANC_VERSION}) - message("This is a release build, setting the version of the library to ${ORTHANC_RELEASE}") - set_target_properties(OrthancClient PROPERTIES VERSION ${ORTHANC_RELEASE} SOVERSION ${ORTHANC_RELEASE}) - else() - message("This is not a release build") - endif() + # Set the version of the "Orthanc Client" shared library + file(STRINGS + ${CMAKE_SOURCE_DIR}/OrthancCppClient/SharedLibrary/Product.json + ORTHANC_CLIENT_VERSION_TMP + REGEX "^[ \t]*\"Version\"[ \t]*") + + string(REGEX REPLACE "^.*\"([0-9]+)\\.([0-9]+)\\.([0-9]+)\"" "\\1.\\2" + ORTHANC_CLIENT_VERSION ${ORTHANC_CLIENT_VERSION_TMP}) + + message("Setting the version of the library to ${ORTHANC_CLIENT_VERSION}") + + set_target_properties(OrthancClient PROPERTIES + VERSION ${ORTHANC_CLIENT_VERSION} + SOVERSION ${ORTHANC_CLIENT_VERSION}) install( diff -r 851b6a19a81c -r 84011417321d OrthancCppClient/SharedLibrary/AUTOGENERATED/OrthancCppClient.h --- a/OrthancCppClient/SharedLibrary/AUTOGENERATED/OrthancCppClient.h Thu Oct 10 15:08:01 2013 +0200 +++ b/OrthancCppClient/SharedLibrary/AUTOGENERATED/OrthancCppClient.h Fri Oct 11 12:06:55 2013 +0200 @@ -81,9 +81,9 @@ /* cf. http://sourceforge.net/p/predef/wiki/Architectures/ */ #ifdef __amd64__ -#define LAAW_ORTHANC_CLIENT_DEFAULT_PATH "libOrthancClient.so" +#define LAAW_ORTHANC_CLIENT_DEFAULT_PATH "libOrthancClient.so.0.6" #else -#define LAAW_ORTHANC_CLIENT_DEFAULT_PATH "libOrthancClient.so" +#define LAAW_ORTHANC_CLIENT_DEFAULT_PATH "libOrthancClient.so.0.6" #endif #define LAAW_ORTHANC_CLIENT_CALL_CONV