[CMake] Problem using find_library() for Mac frameworks

Calder Coalson ccoal.mail at gmail.com
Wed Aug 12 19:14:56 EDT 2009


I have been torturing myself over the following short bit of code all
day to no avail, so I'm sending out an email to this list in the hopes
that someone can catch whatever stupid mistake I'm making.  The code,
which is supposed to find two dependencies for a project is run using
find_package(MacDeps) from my main script.

set(CMAKE_FIND_FRAMEWORK
	/Library/Frameworks
	/System/Library/Frameworks
	~/Library/Frameworks
)
find_library(CARBON names Carbon)
# Find OGRE
find_library(OGRE_LIBRARY names Ogre)
if (OGRE_LIBRARY)
	set(OGRE_FOUND TRUE)
endif()
# Find OIS
find_library(OIS_LIBRARY names OIS)
if (OIS_LIBRARY)
	set(OIS_FOUND TRUE)
endif()

I've placed both the Ogre.framework and OIS.framework in
/Library/Frameworks and double, triple, quadruple, etc. checked that
they're in the right place.  Thanks in advance for any help, and
apologies for whatever piece of unbelievable stupidity I have
accidentally committed.  If it helps, I'm using CMake 2.6.4...


More information about the CMake mailing list