comparison Plugins/Samples/ServeFolders/CMakeLists.txt @ 1323:5a92665dee23

Sample plugin: Serve folders
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 13 Feb 2015 14:28:16 +0100
parents f497a72d9f71
children a761deb85729
comparison
equal deleted inserted replaced
1322:f497a72d9f71 1323:5a92665dee23
1 cmake_minimum_required(VERSION 2.8) 1 cmake_minimum_required(VERSION 2.8)
2 2
3 project(ServeFolders) 3 project(ServeFolders)
4
5 set(ALLOW_DOWNLOADS ON)
6 set(USE_SYSTEM_JSONCPP OFF)
7 include(../../../Resources/CMake/DownloadPackage.cmake)
8 include(../../../Resources/CMake/JsonCppConfiguration.cmake)
4 9
5 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") 10 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
6 link_libraries(uuid) 11 link_libraries(uuid)
7 SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread") 12 SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread")
8 SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -pthread") 13 SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -pthread")
16 if (CMAKE_COMPILER_IS_GNUCXX) 21 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") 22 SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--version-script=${CMAKE_SOURCE_DIR}/VersionScript.map -Wl,--no-undefined")
18 endif() 23 endif()
19 24
20 include_directories(${CMAKE_SOURCE_DIR}/../../Include/) 25 include_directories(${CMAKE_SOURCE_DIR}/../../Include/)
21 add_library(PluginTest SHARED Plugin.cpp) 26 add_library(ServerFolders SHARED
27 Plugin.cpp
28 ${THIRD_PARTY_SOURCES}
29 )
22 30
23 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") 31 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
24 # Linking with "pthread" is necessary, otherwise the software crashes 32 # Linking with "pthread" is necessary, otherwise the software crashes
25 # http://sourceware.org/bugzilla/show_bug.cgi?id=10652#c17 33 # http://sourceware.org/bugzilla/show_bug.cgi?id=10652#c17
26 target_link_libraries(PluginTest pthread dl) 34 target_link_libraries(ServerFolders dl rt)
27 endif() 35 endif()