Mac: Add guards to CMAKE_FIND_FRAMEWORK and CMAKE_FIND_APPBUNDLE defaults

The default for `CMAKE_FIND_FRAMEWORK`, defined in `Darwin.cmake` and
`Darwin-icc.cmake`, is now guarded so that it will not override command line
arguments passed by users.

Similarly for `CMAKE_FIND_APPBUNDLE`
This commit is contained in:
Charlie Sharpsteen 2012-05-30 10:29:26 -07:00 committed by David Cole
parent f1eee26be3
commit 8b2fb3310b
2 changed files with 12 additions and 6 deletions

View File

@ -106,7 +106,9 @@ SET(CMAKE_Fortran_CREATE_SHARED_MODULE
# default to searching for frameworks first
IF(NOT DEFINED CMAKE_FIND_FRAMEWORK)
SET(CMAKE_FIND_FRAMEWORK FIRST)
ENDIF()
# set up the default search directories for frameworks
SET(CMAKE_SYSTEM_FRAMEWORK_PATH
~/Library/Frameworks
@ -115,7 +117,9 @@ SET(CMAKE_SYSTEM_FRAMEWORK_PATH
/System/Library/Frameworks)
# default to searching for application bundles first
IF(NOT DEFINED CMAKE_FIND_APPBUNDLE)
SET(CMAKE_FIND_APPBUNDLE FIRST)
ENDIF()
# set up the default search directories for application bundles
SET(CMAKE_SYSTEM_APPBUNDLE_PATH
~/Applications
@ -125,4 +129,3 @@ SET(CMAKE_SYSTEM_APPBUNDLE_PATH
INCLUDE(Platform/UnixPaths)
SET(CMAKE_SYSTEM_INCLUDE_PATH ${CMAKE_SYSTEM_INCLUDE_PATH} /sw/include)
SET(CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_SYSTEM_LIBRARY_PATH} /sw/lib)

View File

@ -228,9 +228,10 @@ SET(CMAKE_CXX_CREATE_MACOSX_FRAMEWORK
"<CMAKE_CXX_COMPILER> <LANGUAGE_COMPILE_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <LINK_FLAGS> -o <TARGET> <SONAME_FLAG> <TARGET_INSTALLNAME_DIR><TARGET_SONAME> <OBJECTS> <LINK_LIBRARIES>")
# default to searching for frameworks first
IF(NOT DEFINED CMAKE_FIND_FRAMEWORK)
SET(CMAKE_FIND_FRAMEWORK FIRST)
ENDIF()
# set up the default search directories for frameworks
SET(CMAKE_SYSTEM_FRAMEWORK_PATH
~/Library/Frameworks
@ -239,7 +240,9 @@ SET(CMAKE_SYSTEM_FRAMEWORK_PATH
/System/Library/Frameworks)
# default to searching for application bundles first
IF(NOT DEFINED CMAKE_FIND_APPBUNDLE)
SET(CMAKE_FIND_APPBUNDLE FIRST)
ENDIF()
# set up the default search directories for application bundles
SET(_apps_paths)
FOREACH(_path