comparison CMakeLists.txt @ 3623:a6bfa09df8b3

fix for cis
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 24 Jan 2020 17:37:14 +0100
parents 8afc14fab01f
children b53cab5bad84
comparison
equal deleted inserted replaced
3622:8afc14fab01f 3623:a6bfa09df8b3
486 externalproject_add(ConnectivityChecksProject 486 externalproject_add(ConnectivityChecksProject
487 SOURCE_DIR "${ORTHANC_ROOT}/Plugins/Samples/ConnectivityChecks" 487 SOURCE_DIR "${ORTHANC_ROOT}/Plugins/Samples/ConnectivityChecks"
488 488
489 CMAKE_ARGS 489 CMAKE_ARGS
490 -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} 490 -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
491 -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}
491 -DPLUGIN_VERSION=${ORTHANC_VERSION} 492 -DPLUGIN_VERSION=${ORTHANC_VERSION}
492 -DSTATIC_BUILD=${STATIC_BUILD} 493 -DSTATIC_BUILD=${STATIC_BUILD}
493 -DUSE_LEGACY_JSONCPP=${USE_LEGACY_JSONCPP} 494 -DUSE_LEGACY_JSONCPP=${USE_LEGACY_JSONCPP}
494 ${Flags} 495 ${Flags}
495 496 )
496 INSTALL_COMMAND "" # Skip the install step
497 )
498
499 ExternalProject_Get_Property(ConnectivityChecksProject binary_dir)
500 497
501 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") 498 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
502 if (MSVC) 499 if (MSVC)
503 set(Prefix "") 500 set(Prefix "")
504 else() 501 else()
505 set(Prefix "lib") # MinGW 502 set(Prefix "lib") # MinGW
506 endif() 503 endif()
507 504
508 install(FILES 505 install(FILES
509 ${binary_dir}/${Prefix}OrthancChecks.dll 506 ${CMAKE_CURRENT_BINARY_DIR}/${Prefix}OrthancChecks.dll
510 DESTINATION "lib") 507 DESTINATION "lib")
511 else() 508 else()
512 list(GET CMAKE_FIND_LIBRARY_PREFIXES 0 Prefix) 509 list(GET CMAKE_FIND_LIBRARY_PREFIXES 0 Prefix)
513 list(GET CMAKE_FIND_LIBRARY_SUFFIXES 0 Suffix) 510 list(GET CMAKE_FIND_LIBRARY_SUFFIXES 0 Suffix)
514 install(FILES 511 install(FILES
515 ${binary_dir}/${Prefix}OrthancChecks${Suffix} 512 ${CMAKE_CURRENT_BINARY_DIR}/${Prefix}OrthancChecks${Suffix}
516 ${binary_dir}/${Prefix}OrthancChecks${Suffix}.${ORTHANC_VERSION} 513 ${CMAKE_CURRENT_BINARY_DIR}/${Prefix}OrthancChecks${Suffix}.${ORTHANC_VERSION}
517 DESTINATION "share/orthanc/plugins") 514 DESTINATION "share/orthanc/plugins")
518 endif() 515 endif()
519 endif() 516 endif()
520 517
521 518