comparison OrthancServer/Plugins/Samples/Common/OrthancPlugins.cmake @ 4050:cd363608551a framework

fix paths
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 11 Jun 2020 11:44:48 +0200
parents d25f4c0fa160
children bf1a17f12306
comparison
equal deleted inserted replaced
4049:47e9e788224c 4050:cd363608551a
1 set(ORTHANC_ROOT ${SAMPLES_ROOT}/../..)
2 include(CheckIncludeFiles) 1 include(CheckIncludeFiles)
3 include(CheckIncludeFileCXX) 2 include(CheckIncludeFileCXX)
4 include(CheckLibraryExists) 3 include(CheckLibraryExists)
5 include(FindPythonInterp) 4 include(FindPythonInterp)
6 include(${ORTHANC_ROOT}/Resources/CMake/AutoGeneratedCode.cmake) 5 include(${CMAKE_CURRENT_LIST_DIR}/../../../../OrthancFramework/Resources/CMake/AutoGeneratedCode.cmake)
7 include(${ORTHANC_ROOT}/Resources/CMake/DownloadPackage.cmake) 6 include(${CMAKE_CURRENT_LIST_DIR}/../../../../OrthancFramework/Resources/CMake/DownloadPackage.cmake)
8 include(${ORTHANC_ROOT}/Resources/CMake/Compiler.cmake) 7 include(${CMAKE_CURRENT_LIST_DIR}/../../../../OrthancFramework/Resources/CMake/Compiler.cmake)
9 8
10 9
11 if (CMAKE_COMPILER_IS_GNUCXX) 10 if (CMAKE_COMPILER_IS_GNUCXX)
12 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pedantic") 11 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pedantic")
13 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic") 12 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic")
18 # Linking with "pthread" is necessary, otherwise the software crashes 17 # Linking with "pthread" is necessary, otherwise the software crashes
19 # http://sourceware.org/bugzilla/show_bug.cgi?id=10652#c17 18 # http://sourceware.org/bugzilla/show_bug.cgi?id=10652#c17
20 link_libraries(dl rt pthread) 19 link_libraries(dl rt pthread)
21 endif() 20 endif()
22 21
23 include_directories(${SAMPLES_ROOT}/../Include/) 22 include_directories(${CMAKE_CURRENT_LIST_DIR}/../../Include/)
24 23
25 if (MSVC) 24 if (MSVC)
26 if (MSVC_VERSION LESS 1600) 25 if (MSVC_VERSION LESS 1600)
27 # Starting with Visual Studio >= 2010 (i.e. macro _MSC_VER >= 26 # Starting with Visual Studio >= 2010 (i.e. macro _MSC_VER >=
28 # 1600), Microsoft ships a standard-compliant <stdint.h> 27 # 1600), Microsoft ships a standard-compliant <stdint.h>
29 # header. For earlier versions of Visual Studio, give access to a 28 # header. For earlier versions of Visual Studio, give access to a
30 # compatibility header. 29 # compatibility header.
31 # http://stackoverflow.com/a/70630/881731 30 # http://stackoverflow.com/a/70630/881731
32 # https://en.wikibooks.org/wiki/C_Programming/C_Reference/stdint.h#External_links 31 # https://en.wikibooks.org/wiki/C_Programming/C_Reference/stdint.h#External_links
33 include_directories(${SAMPLES_ROOT}/../../Resources/ThirdParty/VisualStudio/) 32 include_directories(${CMAKE_CURRENT_LIST_DIR}/../../../../OrthancFramework/Resources/ThirdParty/VisualStudio/)
34 endif() 33 endif()
35 endif() 34 endif()
36 35
37 add_definitions(-DHAS_ORTHANC_EXCEPTION=0) 36 add_definitions(
37 -DHAS_ORTHANC_EXCEPTION=0
38 -DORTHANC_BUILDING_FRAMEWORK_LIBRARY=0
39 )