annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1322
f497a72d9f71 fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 cmake_minimum_required(VERSION 2.8)
f497a72d9f71 fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2
f497a72d9f71 fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 project(ServeFolders)
f497a72d9f71 fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4
f497a72d9f71 fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
f497a72d9f71 fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 link_libraries(uuid)
f497a72d9f71 fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread")
f497a72d9f71 fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -pthread")
f497a72d9f71 fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
f497a72d9f71 fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 link_libraries(rpcrt4 ws2_32 secur32)
f497a72d9f71 fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 if (CMAKE_COMPILER_IS_GNUCXX)
f497a72d9f71 fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static-libgcc -static-libstdc++")
f497a72d9f71 fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 endif()
f497a72d9f71 fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 endif ()
f497a72d9f71 fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15
f497a72d9f71 fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 if (CMAKE_COMPILER_IS_GNUCXX)
f497a72d9f71 fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--version-script=${CMAKE_SOURCE_DIR}/VersionScript.map -Wl,--no-undefined")
f497a72d9f71 fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 endif()
f497a72d9f71 fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19
f497a72d9f71 fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 include_directories(${CMAKE_SOURCE_DIR}/../../Include/)
f497a72d9f71 fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 add_library(PluginTest SHARED Plugin.cpp)
f497a72d9f71 fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22
f497a72d9f71 fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
f497a72d9f71 fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 # Linking with "pthread" is necessary, otherwise the software crashes
f497a72d9f71 fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 # http://sourceware.org/bugzilla/show_bug.cgi?id=10652#c17
f497a72d9f71 fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 target_link_libraries(PluginTest pthread dl)
f497a72d9f71 fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 endif()