Changeset - a0c8e83be6e3
[Not reviewed]
0 2 0
HanzZ - 13 years ago 2012-09-01 07:57:04
hanzz.k@gmail.com
Windows compilation tweaks
2 files changed with 24 insertions and 6 deletions:
0 comments (0 inline, 0 general)
CMakeLists.txt
Show inline comments
 
@@ -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)
cmake_modules/SwiftenConfig.cmake
Show inline comments
 
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(
0 comments (0 inline, 0 general)