comparison CMakeLists.txt @ 26:6ba765ecf3db

compiling openssl
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 28 Aug 2012 15:10:02 +0200
parents 166664f0f860
children 042ac60f5bf9
comparison
equal deleted inserted replaced
25:dd1489098265 26:6ba765ecf3db
26 26
27 SET(THIRD_PARTY_SOURCES 27 SET(THIRD_PARTY_SOURCES
28 ${CMAKE_SOURCE_DIR}/Resources/md5/md5.c 28 ${CMAKE_SOURCE_DIR}/Resources/md5/md5.c
29 ${CMAKE_SOURCE_DIR}/Resources/base64/base64.cpp 29 ${CMAKE_SOURCE_DIR}/Resources/base64/base64.cpp
30 ) 30 )
31
31 include(${CMAKE_SOURCE_DIR}/Resources/CMake/BoostConfiguration.cmake) 32 include(${CMAKE_SOURCE_DIR}/Resources/CMake/BoostConfiguration.cmake)
32 include(${CMAKE_SOURCE_DIR}/Resources/CMake/DcmtkConfiguration.cmake) 33 include(${CMAKE_SOURCE_DIR}/Resources/CMake/DcmtkConfiguration.cmake)
33 include(${CMAKE_SOURCE_DIR}/Resources/CMake/GoogleTestConfiguration.cmake) 34 include(${CMAKE_SOURCE_DIR}/Resources/CMake/GoogleTestConfiguration.cmake)
34 include(${CMAKE_SOURCE_DIR}/Resources/CMake/MongooseConfiguration.cmake) 35 include(${CMAKE_SOURCE_DIR}/Resources/CMake/MongooseConfiguration.cmake)
35 include(${CMAKE_SOURCE_DIR}/Resources/CMake/ZlibConfiguration.cmake) 36 include(${CMAKE_SOURCE_DIR}/Resources/CMake/ZlibConfiguration.cmake)
36 include(${CMAKE_SOURCE_DIR}/Resources/CMake/SQLiteConfiguration.cmake) 37 include(${CMAKE_SOURCE_DIR}/Resources/CMake/SQLiteConfiguration.cmake)
37 include(${CMAKE_SOURCE_DIR}/Resources/CMake/JsonCppConfiguration.cmake) 38 include(${CMAKE_SOURCE_DIR}/Resources/CMake/JsonCppConfiguration.cmake)
38 include(${CMAKE_SOURCE_DIR}/Resources/CMake/LibCurlConfiguration.cmake) 39 include(${CMAKE_SOURCE_DIR}/Resources/CMake/LibCurlConfiguration.cmake)
39 include(${CMAKE_SOURCE_DIR}/Resources/CMake/LibPngConfiguration.cmake) 40 include(${CMAKE_SOURCE_DIR}/Resources/CMake/LibPngConfiguration.cmake)
40 41
42 if (${ENABLE_SSL})
43 include(${CMAKE_SOURCE_DIR}/Resources/CMake/OpenSslConfiguration.cmake)
44 endif()
45
41 46
42 if (${CMAKE_COMPILER_IS_GNUCXX}) 47 if (${CMAKE_COMPILER_IS_GNUCXX})
43 set(CMAKE_C_FLAGS "-Wall -pedantic -Wno-implicit-function-declaration") # --std=c99 makes libcurl not to compile 48 set(CMAKE_C_FLAGS "-Wall -Wno-long-long -Wno-implicit-function-declaration")
49 # --std=c99 makes libcurl not to compile
50 # -pedantic gives a lot of warnings on OpenSSL
44 set(CMAKE_CXX_FLAGS "-Wall -pedantic -Wno-long-long -Wno-variadic-macros") 51 set(CMAKE_CXX_FLAGS "-Wall -pedantic -Wno-long-long -Wno-variadic-macros")
45 elseif (${MSVC}) 52 elseif (${MSVC})
46 # http://stackoverflow.com/a/6510446 53 # http://stackoverflow.com/a/6510446
47 foreach(flag_var 54 foreach(flag_var
48 CMAKE_C_FLAGS_DEBUG 55 CMAKE_C_FLAGS_DEBUG
182 ) 189 )
183 190
184 TARGET_LINK_LIBRARIES(Palantir ServerLibrary CoreLibrary) 191 TARGET_LINK_LIBRARIES(Palantir ServerLibrary CoreLibrary)
185 TARGET_LINK_LIBRARIES(UnitTests ServerLibrary CoreLibrary) 192 TARGET_LINK_LIBRARIES(UnitTests ServerLibrary CoreLibrary)
186 193
187
188 find_package(Doxygen) 194 find_package(Doxygen)
189 if (DOXYGEN_FOUND) 195 if (DOXYGEN_FOUND)
190 configure_file( 196 configure_file(
191 ${CMAKE_SOURCE_DIR}/Resources/Palantir.doxygen 197 ${CMAKE_SOURCE_DIR}/Resources/Palantir.doxygen
192 ${CMAKE_CURRENT_BINARY_DIR}/Palantir.doxygen 198 ${CMAKE_CURRENT_BINARY_DIR}/Palantir.doxygen