[Orxonox-commit 2518] r7224 - in code/trunk: cmake cmake/tools src
rgrieder at orxonox.net
rgrieder at orxonox.net
Thu Aug 26 15:00:27 CEST 2010
Author: rgrieder
Date: 2010-08-26 15:00:27 +0200 (Thu, 26 Aug 2010)
New Revision: 7224
Added:
code/trunk/cmake/tools/FindPOCO.cmake
Modified:
code/trunk/cmake/LibraryConfig.cmake
code/trunk/cmake/PackageConfig.cmake
code/trunk/src/CMakeLists.txt
Log:
Adjusted CMake code to accept the new v5 dependencies that requires the POCO library.
Modified: code/trunk/cmake/LibraryConfig.cmake
===================================================================
--- code/trunk/cmake/LibraryConfig.cmake 2010-08-26 08:23:07 UTC (rev 7223)
+++ code/trunk/cmake/LibraryConfig.cmake 2010-08-26 13:00:27 UTC (rev 7224)
@@ -90,9 +90,12 @@
FIND_PACKAGE(Vorbis REQUIRED)
FIND_PACKAGE(ALUT REQUIRED)
FIND_PACKAGE(ZLIB REQUIRED)
+IF(POCO_REQUIRED)
+ FIND_PACKAGE(POCO REQUIRED)
+ENDIF()
IF(WIN32)
FIND_PACKAGE(DirectX REQUIRED)
-ENDIF(WIN32)
+ENDIF()
##### CEGUI #####
# We make use of the CEGUI script module called CEGUILua.
Modified: code/trunk/cmake/PackageConfig.cmake
===================================================================
--- code/trunk/cmake/PackageConfig.cmake 2010-08-26 08:23:07 UTC (rev 7223)
+++ code/trunk/cmake/PackageConfig.cmake 2010-08-26 13:00:27 UTC (rev 7224)
@@ -70,6 +70,12 @@
SET(_INTERNAL_PACKAGE_MESSAGE 1 CACHE INTERNAL "Do not edit!" FORCE)
ENDIF()
+# Ogre versions >= 1.7 require the POCO library on Windows for threading
+COMPARE_VERSION_STRINGS(${DEPENDENCY_VERSION} 5 _result TRUE)
+IF(NOT _result EQUAL -1)
+ SET(POCO_REQUIRED TRUE)
+ENDIF()
+
# Include paths and other special treatments
SET(ENV{ALUTDIR} ${DEP_INCLUDE_DIR}/freealut)
SET(ENV{BOOST_ROOT} ${DEP_INCLUDE_DIR}/boost)
@@ -82,6 +88,7 @@
SET(ENV{OGRE_HOME} ${DEP_INCLUDE_DIR}/ogre)
SET(ENV{OGRE_PLUGIN_DIR} ${DEP_BINARY_DIR})
SET(ENV{OPENALDIR} ${DEP_INCLUDE_DIR}/openal)
+SET(ENV{POCODIR} ${DEP_INCLUDE_DIR}/poco)
LIST(APPEND CMAKE_INCLUDE_PATH ${DEP_INCLUDE_DIR}/tcl/include)
LIST(APPEND CMAKE_INCLUDE_PATH ${DEP_INCLUDE_DIR}/zlib/include)
Added: code/trunk/cmake/tools/FindPOCO.cmake
===================================================================
--- code/trunk/cmake/tools/FindPOCO.cmake (rev 0)
+++ code/trunk/cmake/tools/FindPOCO.cmake 2010-08-26 13:00:27 UTC (rev 7224)
@@ -0,0 +1,57 @@
+ #
+ # ORXONOX - the hottest 3D action shooter ever to exist
+ # > www.orxonox.net <
+ #
+ # This program is free software; you can redistribute it and/or
+ # modify it under the terms of the GNU General Public License
+ # as published by the Free Software Foundation; either version 2
+ # of the License, or (at your option) any later version.
+ #
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ # GNU General Public License for more details.
+ #
+ # You should have received a copy of the GNU General Public License along
+ # with this program; if not, write to the Free Software Foundation,
+ # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ #
+ #
+ # Author:
+ # Reto Grieder
+ # Description:
+ # Finds the POCO Foundation library.
+ #
+
+INCLUDE(FindPackageHandleStandardArgs)
+INCLUDE(HandleLibraryTypes)
+
+FIND_PATH(POCO_INCLUDE_DIR Poco/Poco.h
+ PATHS $ENV{POCODIR}
+ PATH_SUFFIXES include
+)
+FIND_LIBRARY(POCO_LIBRARY_OPTIMIZED
+ NAMES PocoFoundation
+ PATHS $ENV{POCODIR}
+ PATH_SUFFIXES lib
+)
+FIND_LIBRARY(POCO_LIBRARY_DEBUG
+ NAMES PocoFoundationd PocoFoundation_d PocoFoundationD PocoFoundation_D
+ PATHS $ENV{POCODIR}
+ PATH_SUFFIXES lib
+)
+
+# Handle the REQUIRED argument and set POCO_FOUND
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(POCO DEFAULT_MSG
+ POCO_LIBRARY_OPTIMIZED
+ POCO_INCLUDE_DIR
+)
+
+# Collect optimized and debug libraries
+HANDLE_LIBRARY_TYPES(POCO)
+
+MARK_AS_ADVANCED(
+ POCO_INCLUDE_DIR
+ POCO_LIBRARY_OPTIMIZED
+ POCO_LIBRARY_DEBUG
+)
Modified: code/trunk/src/CMakeLists.txt
===================================================================
--- code/trunk/src/CMakeLists.txt 2010-08-26 08:23:07 UTC (rev 7223)
+++ code/trunk/src/CMakeLists.txt 2010-08-26 13:00:27 UTC (rev 7224)
@@ -73,6 +73,7 @@
${CEGUI_INCLUDE_DIR}
${ENET_INCLUDE_DIR}
${Boost_INCLUDE_DIRS}
+ ${POCO_INCLUDE_DIR}
${OPENAL_INCLUDE_DIRS}
${ALUT_INCLUDE_DIR}
${VORBIS_INCLUDE_DIR}
More information about the Orxonox-commit
mailing list