|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-02 23:32:11
|
Module: performous
Branch: master
Commit: 3c426bf70d82dc466ef8bc581893a8545b9d6cb2
Author: Lasse Karkkainen <tro...@tr...>
Date: Thu Jul 2 18:22:56 2009 -0500
More compatibility fixes...
---
cmake/Modules/FindBoost.cmake | 22 +++++++++++++---------
game/CMakeLists.txt | 4 ++--
libs/libda/CMakeLists.txt | 10 +---------
libs/libda/plugins/CMakeLists.txt | 22 +++++++++++++++-------
libs/libda/src/CMakeLists.txt | 10 ++++++++++
5 files changed, 41 insertions(+), 27 deletions(-)
diff --git a/cmake/Modules/FindBoost.cmake b/cmake/Modules/FindBoost.cmake
index 7ab8394..b1a5387 100644
--- a/cmake/Modules/FindBoost.cmake
+++ b/cmake/Modules/FindBoost.cmake
@@ -76,7 +76,7 @@
# MESSAGE(STATUS "Finding Boost libraries.... ")
-SET( _boost_TEST_VERSIONS ${Boost_ADDITIONAL_VERSIONS} "1.37.0" "1.37" "1.36.0" "1.36" "1.34.1" "1.34.0" "1.34" "1.33.1" "1.33.0" "1.33")
+SET( _boost_TEST_VERSIONS ${Boost_ADDITIONAL_VERSIONS} "1.39.0" "1.39" "1.38.0" "1.38" "1.37.0" "1.37" "1.36.0" "1.36" "1.34.1" "1.34.0" "1.34" "1.33.1" "1.33.0" "1.33")
############################################
#
@@ -277,9 +277,12 @@ ELSE (_boost_IN_CACHE)
IF (MSVC71)
SET (_boost_COMPILER "-vc71")
ENDIF(MSVC71)
- IF (MSVC80)
+ IF (MSVC80)
SET (_boost_COMPILER "-vc80")
ENDIF(MSVC80)
+ IF (MSVC90)
+ SET (_boost_COMPILER "-vc90")
+ ENDIF(MSVC90)
IF (MINGW)
SET (_boost_COMPILER "-mgw")
ENDIF(MINGW)
@@ -380,6 +383,12 @@ ELSE (_boost_IN_CACHE)
SET(Boost_PROCESS_INCLUDES Boost_INCLUDE_DIR)
FOREACH ( COMPONENT ${Boost_FIND_COMPONENTS} )
+ if (CMAKE_BUILD_TYPE MATCHES "Deb" AND Boost_${COMPONENT}_LIBRARY_DEBUG)
+ set(Boost_${COMPONENT}_LIBRARY ${Boost_${COMPONENT}_LIBRARY_RELEASE})
+ endif (CMAKE_BUILD_TYPE MATCHES "Deb" AND Boost_${COMPONENT}_LIBRARY_DEBUG)
+ if (NOT CMAKE_BUILD_TYPE MATCHES "Deb" AND Boost_${COMPONENT}_LIBRARY_RELEASE)
+ set(Boost_${COMPONENT}_LIBRARY ${Boost_${COMPONENT}_LIBRARY_RELEASE})
+ endif (NOT CMAKE_BUILD_TYPE MATCHES "Deb" AND Boost_${COMPONENT}_LIBRARY_RELEASE)
SET(Boost_PROCESS_LIBS ${Boost_PROCESS_LIBS} Boost_${COMPONENT}_LIBRARY)
ENDFOREACH(COMPONENT)
@@ -388,13 +397,8 @@ ELSE (_boost_IN_CACHE)
# Check that everything was found correctly and do other processing
libfind_process(Boost)
- # MESSAGE(STATUS "Boost_INCLUDE_DIRS: ${Boost_INCLUDE_DIRS}")
- # MESSAGE(STATUS "Boost_LIBRARIES: ${Boost_LIBRARIES}")
-
- # Under Windows, automatic linking is performed, so no need to specify the libraries.
- IF (WIN32)
- SET(Boost_LIBRARIES "")
- ENDIF(WIN32)
+ MESSAGE(STATUS "Boost_INCLUDE_DIRS: ${Boost_INCLUDE_DIRS}")
+ MESSAGE(STATUS "Boost_LIBRARIES: ${Boost_LIBRARIES}")
ENDIF(_boost_IN_CACHE)
diff --git a/game/CMakeLists.txt b/game/CMakeLists.txt
index 3bd9ce9..bda767d 100644
--- a/game/CMakeLists.txt
+++ b/game/CMakeLists.txt
@@ -13,12 +13,12 @@ set(SOURCES ${SOURCE_FILES} ${HEADER_FILES})
include_directories(${CMAKE_SOURCE_DIR}/libs/libda/include)
-find_package(Boost 1.34 REQUIRED COMPONENTS thread program_options regex filesystem)
+find_package(Boost 1.34 REQUIRED COMPONENTS thread date_time program_options regex filesystem)
include_directories(${Boost_INCLUDE_DIRS})
set(LIBS ${LIBS} ${Boost_LIBRARIES})
# Find all the libs that don't require extra parameters
-foreach(lib SDL LibRSVG PangoCairo LibXML++ Magick++ GLEW AVFormat SWScale)
+foreach(lib SDL LibRSVG PangoCairo LibXML++ Magick++ OpenGL GLEW AVFormat SWScale)
find_package(${lib} REQUIRED)
include_directories(${${lib}_INCLUDE_DIRS})
set(LIBS ${LIBS} ${${lib}_LIBRARIES})
diff --git a/libs/libda/CMakeLists.txt b/libs/libda/CMakeLists.txt
index 39fb37e..d279a05 100644
--- a/libs/libda/CMakeLists.txt
+++ b/libs/libda/CMakeLists.txt
@@ -6,17 +6,9 @@ set(LIBDA_PLUGIN_DIR "lib${LIB_SUFFIX}/libda")
include_directories(include)
include_directories(../plugin++/include)
-set(Boost_USE_STATIC_LIBS ON)
-set(Boost_USE_MULTITHREAD ON)
-find_package(Boost 1.34 REQUIRED COMPONENTS thread filesystem)
-
-include_directories(${Boost_INCLUDE_DIR})
-add_library(da src/audio.cpp)
-target_link_libraries(da plugin++ ${Boost_LIBRARIES})
-install(TARGETS da DESTINATION lib${LIB_SUFFIX})
-
FILE(GLOB HEADER_FILES "include/libda/*")
install(FILES ${HEADER_FILES} DESTINATION include/libda)
+add_subdirectory(src)
add_subdirectory(plugins)
diff --git a/libs/libda/plugins/CMakeLists.txt b/libs/libda/plugins/CMakeLists.txt
index a9ec2cc..29e9668 100644
--- a/libs/libda/plugins/CMakeLists.txt
+++ b/libs/libda/plugins/CMakeLists.txt
@@ -1,5 +1,3 @@
-find_package(Boost 1.34 REQUIRED COMPONENTS thread filesystem)
-
set(ALSA_DEFAULT false)
set(PORTAUDIO_DEFAULT true)
@@ -98,8 +96,19 @@ else(LIBDA_PLUGIN_PULSE)
endif(LIBDA_PLUGIN_PULSE)
if(LIBDA_PLUGIN_TESTING)
- set(PLUGIN_TESTING_DESC "enabled")
- set(PLUGIN_TESTING true)
+ set(Boost_USE_STATIC_LIBS ON)
+ set(Boost_USE_MULTITHREAD ON)
+ find_package(Boost 1.36 REQUIRED COMPONENTS thread date_time)
+ if(Boost_FOUND)
+ set(PLUGIN_TESTING_DESC "enabled")
+ set(PLUGIN_TESTING true)
+ else(Boost_FOUND)
+ if(LIBDA_AUTODETECT_PLUGINS)
+ set(PLUGIN_TESTING_DESC "disabled (autodetect)")
+ else(LIBDA_AUTODETECT_PLUGINS)
+ message(FATAL_ERROR "Could not find Boost, but libda test plugin explicitly required")
+ endif(LIBDA_AUTODETECT_PLUGINS)
+ endif(Boost_FOUND)
else(LIBDA_PLUGIN_TESTING)
set(PLUGIN_TESTING_DESC "disabled")
endif(LIBDA_PLUGIN_TESTING)
@@ -161,10 +170,9 @@ if(PLUGIN_PULSE)
endif(PLUGIN_PULSE)
if(PLUGIN_TESTING)
+ include_directories(${Boost_INCLUDE_DIRS})
add_library(da_audio_dev_tone MODULE audio_dev_tone.cpp)
install(TARGETS da_audio_dev_tone DESTINATION ${LIBDA_PLUGIN_DIR})
- if(APPLE)
- target_link_libraries(da_audio_dev_tone da ${Boost_thread_LIBRARY})
- endif(APPLE)
+ target_link_libraries(da_audio_dev_tone da ${Boost_LIBRARIES})
endif(PLUGIN_TESTING)
diff --git a/libs/libda/src/CMakeLists.txt b/libs/libda/src/CMakeLists.txt
new file mode 100644
index 0000000..cab06e2
--- /dev/null
+++ b/libs/libda/src/CMakeLists.txt
@@ -0,0 +1,10 @@
+cmake_minimum_required(VERSION 2.6)
+
+set(Boost_USE_STATIC_LIBS ON)
+set(Boost_USE_MULTITHREAD ON)
+find_package(Boost 1.34 REQUIRED COMPONENTS thread filesystem)
+
+include_directories(${Boost_INCLUDE_DIRS})
+add_library(da audio.cpp)
+target_link_libraries(da plugin++ ${Boost_LIBRARIES})
+install(TARGETS da DESTINATION lib${LIB_SUFFIX})
|