comparison Resources/CMake/Compiler.cmake @ 1649:8040d56cb0b3

New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 25 Sep 2015 16:24:13 +0200
parents fe458dde986e
children c131566b8252 50234539a0dd
comparison
equal deleted inserted replaced
1648:a0a4fa28624c 1649:8040d56cb0b3
48 48
49 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR 49 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR
50 ${CMAKE_SYSTEM_NAME} STREQUAL "kFreeBSD" OR 50 ${CMAKE_SYSTEM_NAME} STREQUAL "kFreeBSD" OR
51 ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") 51 ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
52 set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined") 52 set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined")
53 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined -Wl,--version-script=${CMAKE_SOURCE_DIR}/Plugins/Samples/Common/VersionScript.map") 53 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined -Wl,--version-script=${ORTHANC_ROOT}/Plugins/Samples/Common/VersionScript.map")
54 54
55 # Remove the "-rdynamic" option 55 # Remove the "-rdynamic" option
56 # http://www.mail-archive.com/cmake@cmake.org/msg08837.html 56 # http://www.mail-archive.com/cmake@cmake.org/msg08837.html
57 set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "") 57 set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
58 link_libraries(uuid pthread rt) 58 link_libraries(uuid pthread rt)
106 add_definitions(-DHAVE_WIN_PTHREAD=0) 106 add_definitions(-DHAVE_WIN_PTHREAD=0)
107 endif() 107 endif()
108 endif() 108 endif()
109 109
110 elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") 110 elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
111 SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -exported_symbols_list ${CMAKE_SOURCE_DIR}/Plugins/Samples/Common/ExportedSymbols.list") 111 SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -exported_symbols_list ${ORTHANC_ROOT}/Plugins/Samples/Common/ExportedSymbols.list")
112 112
113 add_definitions( 113 add_definitions(
114 -D_XOPEN_SOURCE=1 114 -D_XOPEN_SOURCE=1
115 ) 115 )
116 link_libraries(iconv) 116 link_libraries(iconv)