From 0c739825f25003047d77aec781924b2c0086f129 Mon Sep 17 00:00:00 2001 From: Nikolay Kasyanov Date: Mon, 16 Apr 2012 15:57:50 +0200 Subject: [PATCH] another fix --- CMakeLists.txt | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 692aa6e51..40347898b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -256,14 +256,6 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") endif() if (APPLE) - # prepare plugins - if (${CMAKE_BUILD_TYPE} MATCHES "Release") - set(OPENMW_RELEASE_BUILD TRUE) - endif() - if (${CMAKE_BUILD_TYPE} MATCHES "RelWithDebugInfo") - set(OPENMW_RELEASE_BUILD TRUE) - endif() - if (${OGRE_PLUGIN_DIR_REL}}) set(OGRE_PLUGINS_REL_FOUND TRUE) endif () @@ -272,17 +264,11 @@ if (APPLE) set(OGRE_PLUGINS_DBG_FOUND TRUE) endif () - if (${OPENMW_RELEASE_BUILD} AND ${OGRE_PLUGINS_REL_FOUND}) + if (${OGRE_PLUGINS_REL_FOUND}) set(OGRE_PLUGIN_DIR ${OGRE_PLUGIN_DIR_REL}) else () set(OGRE_PLUGIN_DIR ${OGRE_PLUGIN_DIR_DBG}) endif () - - if (NOT ${OPENMW_RELEASE_BUILD} AND ${OGRE_PLUGINS_DBG_FOUND}) - set(OGRE_PLUGIN_DIR ${OGRE_PLUGIN_DIR_DBG}) - else() - set(OGRE_PLUGIN_DIR ${OGRE_PLUGIN_DIR_REL}) - endif() set(OGRE_PLUGIN_DIR "${OGRE_PLUGIN_DIR}/") @@ -587,7 +573,7 @@ if (APPLE) if (item MATCHES \"Frameworks\") # if it is a framework # get last segment of path get_filename_component(fname \"\${item}\" NAME_WE) - find_library(ri NAMES \${fname} PATHS \${exepath} \${dirs} /Library/Frameworks) + find_library(ri NAMES \${fname} PATHS \${exepath} \${dirs} \${CMAKE_SYSTEM_FRAMEWORK_PATH}) if (ri) string(REGEX REPLACE \"^.*/Frameworks/.*\\\\.framework\" \"\" item_part \${item}) set(ri \"\${ri}\${item_part}\")