Mercurial > hg > orthanc
comparison CMakeLists.txt @ 600:851b6a19a81c
setting soname
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 10 Oct 2013 15:08:01 +0200 |
parents | e51543cdbffd |
children | 84011417321d |
comparison
equal
deleted
inserted
replaced
599:e51543cdbffd | 600:851b6a19a81c |
---|---|
1 cmake_minimum_required(VERSION 2.8) | 1 cmake_minimum_required(VERSION 2.8) |
2 | 2 |
3 project(Orthanc) | 3 project(Orthanc) |
4 | 4 |
5 # Version of the build, should always be "mainline" except in release branches | 5 # Version of the build, should always be "mainline" except in release branches |
6 add_definitions( | 6 set(ORTHANC_VERSION "mainline") |
7 -DORTHANC_VERSION="mainline" | |
8 ) | |
9 | 7 |
10 | 8 |
11 ##################################################################### | 9 ##################################################################### |
12 ## CMake parameters tunable at the command line | 10 ## CMake parameters tunable at the command line |
13 ##################################################################### | 11 ##################################################################### |
117 | 115 |
118 | 116 |
119 ##################################################################### | 117 ##################################################################### |
120 ## Build the core of Orthanc | 118 ## Build the core of Orthanc |
121 ##################################################################### | 119 ##################################################################### |
120 | |
121 add_definitions( | |
122 -DORTHANC_VERSION="${ORTHANC_VERSION}" | |
123 ) | |
122 | 124 |
123 list(LENGTH OPENSSL_SOURCES OPENSSL_SOURCES_LENGTH) | 125 list(LENGTH OPENSSL_SOURCES OPENSSL_SOURCES_LENGTH) |
124 if (${OPENSSL_SOURCES_LENGTH} GREATER 0) | 126 if (${OPENSSL_SOURCES_LENGTH} GREATER 0) |
125 add_library(OpenSSL STATIC ${OPENSSL_SOURCES}) | 127 add_library(OpenSSL STATIC ${OPENSSL_SOURCES}) |
126 endif() | 128 endif() |
335 | 337 |
336 else() | 338 else() |
337 message(FATAL_ERROR "Support your platform here") | 339 message(FATAL_ERROR "Support your platform here") |
338 endif() | 340 endif() |
339 | 341 |
342 | |
343 # Set the version of the shared library for releases | |
344 string(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+$" ORTHANC_IS_RELEASE ${ORTHANC_VERSION}) | |
345 if (ORTHANC_IS_RELEASE) | |
346 string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.([0-9]+)$" "\\1.\\2" ORTHANC_RELEASE ${ORTHANC_VERSION}) | |
347 message("This is a release build, setting the version of the library to ${ORTHANC_RELEASE}") | |
348 set_target_properties(OrthancClient PROPERTIES VERSION ${ORTHANC_RELEASE} SOVERSION ${ORTHANC_RELEASE}) | |
349 else() | |
350 message("This is not a release build") | |
351 endif() | |
352 | |
353 | |
340 install( | 354 install( |
341 TARGETS OrthancClient | 355 TARGETS OrthancClient |
342 RUNTIME DESTINATION lib # Destination for Windows | 356 RUNTIME DESTINATION lib # Destination for Windows |
343 LIBRARY DESTINATION lib # Destination for Linux | 357 LIBRARY DESTINATION lib # Destination for Linux |
344 ) | 358 ) |
347 FILES ${ORTHANC_ROOT}/OrthancCppClient/SharedLibrary/AUTOGENERATED/OrthancCppClient.h | 361 FILES ${ORTHANC_ROOT}/OrthancCppClient/SharedLibrary/AUTOGENERATED/OrthancCppClient.h |
348 DESTINATION include/orthanc | 362 DESTINATION include/orthanc |
349 ) | 363 ) |
350 endif() | 364 endif() |
351 | 365 |
366 | |
367 | |
352 | 368 |
353 ##################################################################### | 369 ##################################################################### |
354 ## Generate the documentation if Doxygen is present | 370 ## Generate the documentation if Doxygen is present |
355 ##################################################################### | 371 ##################################################################### |
356 | 372 |