[Orxonox-commit 2519] r7225 - code/trunk/cmake
rgrieder at orxonox.net
rgrieder at orxonox.net
Thu Aug 26 15:02:27 CEST 2010
Author: rgrieder
Date: 2010-08-26 15:02:27 +0200 (Thu, 26 Aug 2010)
New Revision: 7225
Modified:
code/trunk/cmake/LibraryConfig.cmake
Log:
Extended search paths for dependencies. You should now be able to host dependencies in one of theses fashions:
dependencies/version.txt
dependencies/msvc8/version.txt
dependencies/msvc8/dependencies/version.txt
This allows to have different header files for different compilers.
Modified: code/trunk/cmake/LibraryConfig.cmake
===================================================================
--- code/trunk/cmake/LibraryConfig.cmake 2010-08-26 13:00:27 UTC (rev 7224)
+++ code/trunk/cmake/LibraryConfig.cmake 2010-08-26 13:02:27 UTC (rev 7225)
@@ -51,13 +51,21 @@
IF(DEPENDENCY_PACKAGE_ENABLE)
GET_FILENAME_COMPONENT(_dep_dir_1 ${CMAKE_SOURCE_DIR}/../dependencies ABSOLUTE)
- GET_FILENAME_COMPONENT(_dep_dir_2 ${CMAKE_SOURCE_DIR}/../lib_dist/dependencies ABSOLUTE)
+ GET_FILENAME_COMPONENT(_dep_dir_2 ${CMAKE_SOURCE_DIR}/../lib_dist ABSOLUTE)
+ IF(MINGW)
+ SET(_compiler_prefix mingw)
+ ELSEIF(MSVC80)
+ SET(_compiler_prefix msvc8)
+ ELSEIF(MSVC90)
+ SET(_compiler_prefix msvc9)
+ ENDIF()
FIND_PATH(DEPENDENCY_PACKAGE_DIR
- NAMES include
+ NAMES version.txt
PATHS
${CMAKE_SOURCE_DIR}/dependencies
${_dep_dir_1}
${_dep_dir_2}
+ PATH_SUFFIXES ${_compiler_prefix} ${_compiler_prefix}/dependencies
NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH
)
IF(NOT DEPENDENCY_PACKAGE_DIR)
More information about the Orxonox-commit
mailing list