Find Swiften before Boost so we have only single version of program_options linked in

This commit is contained in:
HanzZ 2012-11-30 17:04:42 +01:00
parent 636253d514
commit 355a48ba9f

View file

@ -49,6 +49,33 @@ set(CMAKE_MODULE_PATH "cmake_modules")
###### Prerequisites ######
# FIND SWIFTEN
set(Swiften_DIR "${CMAKE_SOURCE_DIR}/cmake_modules")
find_package(Swiften)
if(NOT SWIFTEN_FOUND)
if (ZLIB_LIBRARY)
set(SWIFTEN_LIBRARY ${SWIFTEN_LIBRARY} ${ZLIB_LIBRARY})
endif()
if (EXPAT_LIBRARY)
set(SWIFTEN_LIBRARY ${SWIFTEN_LIBRARY} ${EXPAT_LIBRARY})
endif()
if (LIBIDN_LIBRARY)
set(SWIFTEN_LIBRARY ${SWIFTEN_LIBRARY} ${LIBIDN_LIBRARY})
endif()
if (LIBXML_LIBRARY)
set(SWIFTEN_LIBRARY ${SWIFTEN_LIBRARY} ${LIBXML_LIBRARY})
endif()
set(SWIFTEN_LIBRARY ${SWIFTEN_LIBRARY} "Dnsapi")
set(SWIFTEN_LIBRARY ${SWIFTEN_LIBRARY} "Crypt32")
set(SWIFTEN_LIBRARY ${SWIFTEN_LIBRARY} "Secur32")
set(SWIFTEN_LIBRARY ${SWIFTEN_LIBRARY} "Iphlpapi")
set(SWIFTEN_LIBRARY ${SWIFTEN_LIBRARY} "Winscard")
message(STATUS "Using swiften: ${SWIFTEN_INCLUDE_DIR} ${SWIFTEN_LIBRARY}")
endif()
# FIND BOOST
set(Boost_DIR "${CMAKE_SOURCE_DIR}/cmake_modules")
if (WIN32)
@ -156,32 +183,6 @@ if (NOT PROTOBUF_FOUND AND PROTOBUF_INCLUDE_DIR AND PROTOBUF_LIBRARY)
message(STATUS "Using protobuf: ${PROTOBUF_INCLUDE_DIRS} ${PROTOBUF_LIBRARY}")
endif()
# FIND SWIFTEN
set(Swiften_DIR "${CMAKE_SOURCE_DIR}/cmake_modules")
find_package(Swiften)
if(NOT SWIFTEN_FOUND)
if (ZLIB_LIBRARY)
set(SWIFTEN_LIBRARY ${SWIFTEN_LIBRARY} ${ZLIB_LIBRARY})
endif()
if (EXPAT_LIBRARY)
set(SWIFTEN_LIBRARY ${SWIFTEN_LIBRARY} ${EXPAT_LIBRARY})
endif()
if (LIBIDN_LIBRARY)
set(SWIFTEN_LIBRARY ${SWIFTEN_LIBRARY} ${LIBIDN_LIBRARY})
endif()
if (LIBXML_LIBRARY)
set(SWIFTEN_LIBRARY ${SWIFTEN_LIBRARY} ${LIBXML_LIBRARY})
endif()
set(SWIFTEN_LIBRARY ${SWIFTEN_LIBRARY} "Dnsapi")
set(SWIFTEN_LIBRARY ${SWIFTEN_LIBRARY} "Crypt32")
set(SWIFTEN_LIBRARY ${SWIFTEN_LIBRARY} "Secur32")
set(SWIFTEN_LIBRARY ${SWIFTEN_LIBRARY} "Iphlpapi")
set(SWIFTEN_LIBRARY ${SWIFTEN_LIBRARY} "Winscard")
message(STATUS "Using swiften: ${SWIFTEN_INCLUDE_DIR} ${SWIFTEN_LIBRARY}")
endif()
if (WIN32)
add_definitions(-DSWIFTEN_STATIC=1)
ADD_DEFINITIONS(-D_UNICODE)