[Orxonox-commit 3436] r8123 - in code/branches/kicklib: cmake src/external/ogreceguirenderer
rgrieder at orxonox.net
rgrieder at orxonox.net
Sat Mar 26 17:42:23 CET 2011
Author: rgrieder
Date: 2011-03-26 17:42:23 +0100 (Sat, 26 Mar 2011)
New Revision: 8123
Modified:
code/branches/kicklib/cmake/LibraryConfig.cmake
code/branches/kicklib/cmake/PackageConfig.cmake
code/branches/kicklib/cmake/PackageConfigOSX.cmake
code/branches/kicklib/src/external/ogreceguirenderer/CMakeLists.txt
Log:
Cleaned up threading library linking for OGRE. please test.
Modified: code/branches/kicklib/cmake/LibraryConfig.cmake
===================================================================
--- code/branches/kicklib/cmake/LibraryConfig.cmake 2011-03-26 16:19:59 UTC (rev 8122)
+++ code/branches/kicklib/cmake/LibraryConfig.cmake 2011-03-26 16:42:23 UTC (rev 8123)
@@ -97,31 +97,19 @@
############### Library finding #################
# Performs the search and sets the variables #
-FIND_PACKAGE(OGRE 1.6 REQUIRED)
-#FIND_PACKAGE(ENet 1.1 REQUIRED)
+#FIND_PACKAGE(ENet 1.2 REQUIRED)
+FIND_PACKAGE(CEGUI 0.6 REQUIRED)
FIND_PACKAGE(Lua5.1 REQUIRED)
FIND_PACKAGE(Ogg REQUIRED)
FIND_PACKAGE(Vorbis REQUIRED)
FIND_PACKAGE(ALUT REQUIRED)
FIND_PACKAGE(ZLIB REQUIRED)
-IF(POCO_REQUIRED)
- FIND_PACKAGE(POCO REQUIRED)
- # Always link against POCO too because of threading
- SET(OGRE_LIBRARY ${OGRE_LIBRARY} ${POCO_LIBRARY})
-ENDIF()
+
IF(WIN32)
FIND_PACKAGE(DbgHelp)
FIND_PACKAGE(DirectX REQUIRED)
ENDIF()
-##### CEGUI #####
-# We make use of the CEGUI script module called CEGUILua.
-# However there is a small issue with that: Both CEGUILua and Orxonox use
-# Lua library functions on the same objects. And it turns out that in this case
-# the linked library must be EXACTLY the same.
-# Since Lua v5.1 has been out for a long while, this does not seem to be a
-# problem anymore, at least as long as Lua 5.2 is not released.
-FIND_PACKAGE(CEGUI 0.6 REQUIRED)
##### OpenAL #####
FIND_PACKAGE(OpenAL REQUIRED)
@@ -164,7 +152,20 @@
ENDIF()
ENDIF()
+##### OGRE #####
+FIND_PACKAGE(OGRE 1.6 REQUIRED)
+# For Ogre >= 1.7, we might need a threading library
+# Variables are either defined by dependency package config or by FindOGRE
+IF(OGRE_NEEDS_POCO)
+ FIND_PACKAGE(POCO REQUIRED)
+ # Always link against POCO too because of threading
+ SET(OGRE_LIBRARY ${OGRE_LIBRARY} ${POCO_LIBRARY})
+ELSEIF(OGRE_NEEDS_BOOST)
+ # Always link against boost too because of threading
+ SET(OGRE_LIBRARY ${OGRE_LIBRARY} ${Boost_THREAD_LIBRARY})
+ENDIF()
+
####### Static/Dynamic linking options ##########
# On Windows dynamically linked libraries need some special treatment
Modified: code/branches/kicklib/cmake/PackageConfig.cmake
===================================================================
--- code/branches/kicklib/cmake/PackageConfig.cmake 2011-03-26 16:19:59 UTC (rev 8122)
+++ code/branches/kicklib/cmake/PackageConfig.cmake 2011-03-26 16:42:23 UTC (rev 8123)
@@ -32,7 +32,7 @@
# Ogre versions >= 1.7 require the POCO library on Windows with MSVC for threading
COMPARE_VERSION_STRINGS(${DEPENDENCY_VERSION} 5 _result TRUE)
IF(NOT _result EQUAL -1 AND NOT APPLE)
- SET(POCO_REQUIRED TRUE)
+ SET(OGRE_NEEDS_POCO TRUE)
ENDIF()
# Include paths and other special treatments
Modified: code/branches/kicklib/cmake/PackageConfigOSX.cmake
===================================================================
--- code/branches/kicklib/cmake/PackageConfigOSX.cmake 2011-03-26 16:19:59 UTC (rev 8122)
+++ code/branches/kicklib/cmake/PackageConfigOSX.cmake 2011-03-26 16:42:23 UTC (rev 8123)
@@ -48,6 +48,9 @@
SET(ENV{VORBISDIR} ${DEP_INCLUDE_DIR})
SET(ENV{OGRE_PLUGIN_DIR} ${DEP_BINARY_DIR})
+# Linking to OGRE requires linking to the boost threading library
+SET(OGRE_NEEDS_BOOST TRUE)
+
# For OS X 10.5 we have to ship modified headers to make it compile
# on gcc >= 4.2 (binaries stay the same)
# Sets the library path for the FIND_LIBRARY
Modified: code/branches/kicklib/src/external/ogreceguirenderer/CMakeLists.txt
===================================================================
--- code/branches/kicklib/src/external/ogreceguirenderer/CMakeLists.txt 2011-03-26 16:19:59 UTC (rev 8122)
+++ code/branches/kicklib/src/external/ogreceguirenderer/CMakeLists.txt 2011-03-26 16:42:23 UTC (rev 8123)
@@ -34,9 +34,6 @@
DEFINE_SYMBOL
"OGRE_GUIRENDERER_EXPORTS"
LINK_LIBRARIES
- ${Boost_SYSTEM_LIBRARY}
- ${Boost_THREAD_LIBRARY}
- ${Boost_DATE_TIME_LIBRARY}
${OGRE_LIBRARY}
${CEGUI_LIBRARY}
SOURCE_FILES
More information about the Orxonox-commit
mailing list