Windows compilation tweaks
This commit is contained in:
parent
8b6a86d528
commit
a0c8e83be6
2 changed files with 24 additions and 6 deletions
|
@ -45,6 +45,10 @@ find_package(event)
|
|||
set(Swiften_DIR "${CMAKE_SOURCE_DIR}/cmake_modules")
|
||||
find_package(Swiften)
|
||||
|
||||
if (WIN32)
|
||||
add_definitions(-DSWIFTEN_STATIC=1)
|
||||
endif()
|
||||
|
||||
if (CMAKE_COMPILER_IS_GNUCXX)
|
||||
set(openssl_DIR "${CMAKE_SOURCE_DIR}/cmake_modules")
|
||||
find_package(openssl)
|
||||
|
@ -52,15 +56,29 @@ endif()
|
|||
|
||||
set(Boost_DIR "${CMAKE_SOURCE_DIR}/cmake_modules")
|
||||
if (WIN32)
|
||||
set(Boost_USE_STATIC_LIBS ON)
|
||||
set(Boost_USE_MULTITHREADED ON)
|
||||
set(Boost_USE_STATIC_RUNTIME OFF)
|
||||
if (BOOST_VERSION)
|
||||
set(Boost_USE_STATIC_LIBS ON)
|
||||
set(Boost_USE_MULTITHREADED ON)
|
||||
set(Boost_USE_STATIC_RUNTIME OFF)
|
||||
find_package(Boost ${BOOST_VERSION} COMPONENTS program_options date_time system filesystem regex signals REQUIRED)
|
||||
else()
|
||||
message(FATAL_ERROR "Set BOOST_VERSION using for example cmake . -DBOOST_VERSION=1.49.0")
|
||||
endif()
|
||||
else()
|
||||
find_package(Boost COMPONENTS program_options date_time system filesystem regex signals REQUIRED)
|
||||
endif()
|
||||
|
||||
message( STATUS "Found Boost: ${Boost_LIBRARIES}, ${Boost_INCLUDE_DIR}")
|
||||
|
||||
if (WIN32)
|
||||
#TODO: Use bundled protobuf here...?
|
||||
set(PROTOBUF_FOUND 1)
|
||||
set(PROTOBUF_INCLUDE_DIRS "../include")
|
||||
set(PROTOBUF_LIBRARY "../lib/libprotobuf.lib")
|
||||
else()
|
||||
set(Protobuf_DIR "${CMAKE_SOURCE_DIR}/cmake_modules")
|
||||
find_package(Protobuf REQUIRED)
|
||||
endif()
|
||||
|
||||
set(Communi_DIR "${CMAKE_SOURCE_DIR}/cmake_modules")
|
||||
find_package(Communi)
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
FIND_LIBRARY(SWIFTEN_LIBRARY NAMES Swiften)
|
||||
FIND_PATH(SWIFTEN_INCLUDE_DIR NAMES "Swiften/Swiften.h" PATH_SUFFIXES libSwiften Swiften )
|
||||
FIND_LIBRARY(SWIFTEN_LIBRARY NAMES Swiften HINTS ../lib)
|
||||
FIND_PATH(SWIFTEN_INCLUDE_DIR NAMES "Swiften/Swiften.h" PATH_SUFFIXES libSwiften Swiften HINTS ../include)
|
||||
|
||||
if( SWIFTEN_LIBRARY AND SWIFTEN_INCLUDE_DIR )
|
||||
find_program(SWIFTEN_CONFIG_EXECUTABLE NAMES swiften-config DOC "swiften-config executable")
|
||||
find_program(SWIFTEN_CONFIG_EXECUTABLE NAMES swiften-config DOC "swiften-config executable" HINTS ../bin)
|
||||
set( SWIFTEN_CFLAGS "" )
|
||||
if (SWIFTEN_CONFIG_EXECUTABLE)
|
||||
execute_process(
|
||||
|
|
Loading…
Add table
Reference in a new issue