From 978b5f64d8767ef05b1010ecd8f862d36bba1b65 Mon Sep 17 00:00:00 2001 From: Roman Melnik Date: Sun, 25 Mar 2012 23:53:14 +0300 Subject: [PATCH 1/2] Merge cmake/findBullet patch for '_debug' postfixed libraries Merge in the patch from the cmake official repository: https://cmake.org/gitweb?p=cmake.git;a=commit;h=6f935d7f55af5c96d18d23b72991e87d1e029dda Without this fix cmake couldn't find bullet's debug libraries, and VS2010 openmw project file was generated with links to release libraries instead (which caused errors during build in debug configuration). --- cmake/FindBullet.cmake | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmake/FindBullet.cmake b/cmake/FindBullet.cmake index 7bdf75a0a..552a0651a 100644 --- a/cmake/FindBullet.cmake +++ b/cmake/FindBullet.cmake @@ -51,13 +51,13 @@ find_path(BULLET_INCLUDE_DIR NAMES btBulletCollisionCommon.h # Find the libraries _FIND_BULLET_LIBRARY(BULLET_DYNAMICS_LIBRARY BulletDynamics) -_FIND_BULLET_LIBRARY(BULLET_DYNAMICS_LIBRARY_DEBUG BulletDynamics_d) +_FIND_BULLET_LIBRARY(BULLET_DYNAMICS_LIBRARY_DEBUG BulletDynamics_Debug BulletDynamics_d) _FIND_BULLET_LIBRARY(BULLET_COLLISION_LIBRARY BulletCollision) -_FIND_BULLET_LIBRARY(BULLET_COLLISION_LIBRARY_DEBUG BulletCollision_d) -_FIND_BULLET_LIBRARY(BULLET_MATH_LIBRARY LinearMath BulletMath) -_FIND_BULLET_LIBRARY(BULLET_MATH_LIBRARY_DEBUG LinearMath_d BulletMath_d) +_FIND_BULLET_LIBRARY(BULLET_COLLISION_LIBRARY_DEBUG BulletCollision_Debug BulletCollision_d) +_FIND_BULLET_LIBRARY(BULLET_MATH_LIBRARY BulletMath LinearMath) +_FIND_BULLET_LIBRARY(BULLET_MATH_LIBRARY_DEBUG BulletMath_Debug BulletMath_d LinearMath_debug LinearMath_d) _FIND_BULLET_LIBRARY(BULLET_SOFTBODY_LIBRARY BulletSoftBody) -_FIND_BULLET_LIBRARY(BULLET_SOFTBODY_LIBRARY_DEBUG BulletSoftBody_d) +_FIND_BULLET_LIBRARY(BULLET_SOFTBODY_LIBRARY_DEBUG BulletSoftBody_Debug BulletSoftBody_d) # handle the QUIETLY and REQUIRED arguments and set BULLET_FOUND to TRUE if From 35c3a0a3f921ef767121fea17cf2ebf1f4808f7e Mon Sep 17 00:00:00 2001 From: Roman Melnik Date: Mon, 26 Mar 2012 00:12:00 +0300 Subject: [PATCH 2/2] Add Boost_USE_STATIC_LIBS parameter for Windows If this parameter is not set in windows, cmake expects boost libraries to be named "boost_*.lib", while they are actually "libboost_*.lib" In findBoost.cmake (728): # Setting some more suffixes for the library set (Boost_LIB_PREFIX "") if (WIN32 AND Boost_USE_STATIC_LIBS AND NOT CYGWIN) set(Boost_LIB_PREFIX "lib") endif() --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index d5f0bffa8..d2801c8f2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -168,6 +168,7 @@ set(OPENMW_LIBS_HEADER) # Platform specific if (WIN32) + set(Boost_USE_STATIC_LIBS ON) set(PLATFORM_INCLUDE_DIR "platform") add_definitions(-DBOOST_ALL_NO_LIB) else (WIN32)