comparison Plugins/Samples/ServeFolders/CMakeLists.txt @ 1322:f497a72d9f71

fixes to the sample plugins
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 13 Feb 2015 13:28:01 +0100
parents
children 5a92665dee23
comparison
equal deleted inserted replaced
1321:0f9e0e808e0f 1322:f497a72d9f71
1 cmake_minimum_required(VERSION 2.8)
2
3 project(ServeFolders)
4
5 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
6 link_libraries(uuid)
7 SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread")
8 SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -pthread")
9 elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
10 link_libraries(rpcrt4 ws2_32 secur32)
11 if (CMAKE_COMPILER_IS_GNUCXX)
12 SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static-libgcc -static-libstdc++")
13 endif()
14 endif ()
15
16 if (CMAKE_COMPILER_IS_GNUCXX)
17 SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--version-script=${CMAKE_SOURCE_DIR}/VersionScript.map -Wl,--no-undefined")
18 endif()
19
20 include_directories(${CMAKE_SOURCE_DIR}/../../Include/)
21 add_library(PluginTest SHARED Plugin.cpp)
22
23 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
24 # Linking with "pthread" is necessary, otherwise the software crashes
25 # http://sourceware.org/bugzilla/show_bug.cgi?id=10652#c17
26 target_link_libraries(PluginTest pthread dl)
27 endif()