comparison OrthancServer/Plugins/Samples/Common/OrthancPlugins.cmake @ 4044:d25f4c0fa160 framework

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