Hi ladies and gentlemen I've just started using cmake a week or so ago but I am having some difficulties getting cmake to find external libraries. I am not new to programming just new to cmake.
I am making a very simple project with a structure like this project ...cmakelists.txt project/source ...cmakelists.txt ...main.c project/source/core cmakelists.txt ...source1.h ...source1.c project/source/core/module1 project/source/core/module2 project/source/core/moduleN the main.c will include source1.h, source1.h will include headers from the sub modules as i build them out. The submodule1.h includes external libraries. This is what my main cmakelists looks like CMAKE_MINIMUM_REQUIRED(VERSION 2.6) PROJECT(bluengine) SET(VERSION_MAJOR "0") SET(VERSION_MINOR "1") SET(VERSION_PATCH "0") SET(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}") MESSAGE("Binary tree path ${PROJECT_SOURCE_DIR}") MESSAGE("Version ${VERSION}") ADD_SUBDIRECTORY(source) the source cmake project looks like this: PROJECT(launcher) SET(SRC_FILES main.c) ADD_EXECUTABLE(launcher, "${SRC_FILES}") ADD_SUBDIRECTORY(source) This project starts to build but fails because of the import that's included in main.c I am on a mac and I know where the files are located, the headers are located at /Library/Frameworks/SDL2.framework/Headers but I am unsure how to set this project to go there and find the files. I've read a few tutorials but they don't quite explain this in a way that I can follow. Hoping someone on this mailing list can help me figure this out. Best, Owen
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake