annotate OrthancServer/Plugins/Samples/Common/OrthancPlugins.cmake @ 4099:bf1a17f12306

moving version scripts from OrthancFramework to OrthancServer
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 06 Jul 2020 08:48:35 +0200
parents cd363608551a
children 3d6ee570cfb2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3373
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 2205
diff changeset
1 include(CheckIncludeFiles)
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 2205
diff changeset
2 include(CheckIncludeFileCXX)
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 2205
diff changeset
3 include(CheckLibraryExists)
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 2205
diff changeset
4 include(FindPythonInterp)
4050
cd363608551a fix paths
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
5 include(${CMAKE_CURRENT_LIST_DIR}/../../../../OrthancFramework/Resources/CMake/AutoGeneratedCode.cmake)
cd363608551a fix paths
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
6 include(${CMAKE_CURRENT_LIST_DIR}/../../../../OrthancFramework/Resources/CMake/DownloadPackage.cmake)
cd363608551a fix paths
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
7 include(${CMAKE_CURRENT_LIST_DIR}/../../../../OrthancFramework/Resources/CMake/Compiler.cmake)
4099
bf1a17f12306 moving version scripts from OrthancFramework to OrthancServer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4050
diff changeset
8 include(${CMAKE_CURRENT_LIST_DIR}/OrthancPluginsExports.cmake)
3373
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 2205
diff changeset
9
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 2205
diff changeset
10
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 2205
diff changeset
11 if (CMAKE_COMPILER_IS_GNUCXX)
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 2205
diff changeset
12 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pedantic")
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 2205
diff changeset
13 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic")
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 2205
diff changeset
14 endif()
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 2205
diff changeset
15
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 2205
diff changeset
16
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 2205
diff changeset
17 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 2205
diff changeset
18 # Linking with "pthread" is necessary, otherwise the software crashes
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 2205
diff changeset
19 # http://sourceware.org/bugzilla/show_bug.cgi?id=10652#c17
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 2205
diff changeset
20 link_libraries(dl rt pthread)
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 2205
diff changeset
21 endif()
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 2205
diff changeset
22
4050
cd363608551a fix paths
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
23 include_directories(${CMAKE_CURRENT_LIST_DIR}/../../Include/)
3373
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 2205
diff changeset
24
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 2205
diff changeset
25 if (MSVC)
3572
6fbc2f97de3a Fixed sample plugin cmake files for newer VS versions
Benjamin Golinvaux <bgo@osimis.io>
parents: 3373
diff changeset
26 if (MSVC_VERSION LESS 1600)
6fbc2f97de3a Fixed sample plugin cmake files for newer VS versions
Benjamin Golinvaux <bgo@osimis.io>
parents: 3373
diff changeset
27 # Starting with Visual Studio >= 2010 (i.e. macro _MSC_VER >=
6fbc2f97de3a Fixed sample plugin cmake files for newer VS versions
Benjamin Golinvaux <bgo@osimis.io>
parents: 3373
diff changeset
28 # 1600), Microsoft ships a standard-compliant <stdint.h>
6fbc2f97de3a Fixed sample plugin cmake files for newer VS versions
Benjamin Golinvaux <bgo@osimis.io>
parents: 3373
diff changeset
29 # header. For earlier versions of Visual Studio, give access to a
6fbc2f97de3a Fixed sample plugin cmake files for newer VS versions
Benjamin Golinvaux <bgo@osimis.io>
parents: 3373
diff changeset
30 # compatibility header.
6fbc2f97de3a Fixed sample plugin cmake files for newer VS versions
Benjamin Golinvaux <bgo@osimis.io>
parents: 3373
diff changeset
31 # http://stackoverflow.com/a/70630/881731
6fbc2f97de3a Fixed sample plugin cmake files for newer VS versions
Benjamin Golinvaux <bgo@osimis.io>
parents: 3373
diff changeset
32 # https://en.wikibooks.org/wiki/C_Programming/C_Reference/stdint.h#External_links
4050
cd363608551a fix paths
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
33 include_directories(${CMAKE_CURRENT_LIST_DIR}/../../../../OrthancFramework/Resources/ThirdParty/VisualStudio/)
3572
6fbc2f97de3a Fixed sample plugin cmake files for newer VS versions
Benjamin Golinvaux <bgo@osimis.io>
parents: 3373
diff changeset
34 endif()
3373
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 2205
diff changeset
35 endif()
4a8e8a96b233 Fixed CRLF to LF in various files (found through grepping the source tree)
Benjamin Golinvaux <bgo@osimis.io>
parents: 2205
diff changeset
36
4050
cd363608551a fix paths
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
37 add_definitions(
cd363608551a fix paths
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
38 -DHAS_ORTHANC_EXCEPTION=0
cd363608551a fix paths
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
39 -DORTHANC_BUILDING_FRAMEWORK_LIBRARY=0
cd363608551a fix paths
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
40 )