<div dir="ltr">Hi ladies and gentlemen<div><br></div><div>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.</div><div><br></div><div>I am making a very simple project with a structure like this</div><div>project</div><div>...cmakelists.txt</div><div>project/source</div><div>...cmakelists.txt</div><div>...main.c</div><div>project/source/core</div><div>cmakelists.txt</div><div>...source1.h<br></div><div>...source1.c<br></div><div>project/source/core/module1<br></div><div>project/source/core/module2<br></div><div>project/source/core/moduleN<br></div><div><br></div><div>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.</div><div><br></div><div>This is what my main cmakelists looks like</div><div><div>CMAKE_MINIMUM_REQUIRED(VERSION 2.6)</div><div>PROJECT(bluengine)</div><div><br></div><div>SET(VERSION_MAJOR "0")</div><div>SET(VERSION_MINOR "1")</div><div>SET(VERSION_PATCH "0")</div><div><br></div><div>SET(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")</div><div><br></div><div>MESSAGE("Binary tree path ${PROJECT_SOURCE_DIR}")</div><div>MESSAGE("Version ${VERSION}")</div><div><br></div><div>ADD_SUBDIRECTORY(source)</div></div><div><br></div><div><br></div><div>the source cmake project looks like this:</div><div><div>PROJECT(launcher)</div><div><br></div><div>SET(SRC_FILES main.c)</div><div><br></div><div>ADD_EXECUTABLE(launcher, "${SRC_FILES}")</div><div><br></div><div>ADD_SUBDIRECTORY(source)</div></div><div><br></div><div>This project starts to build but fails because of the import that's included in main.c</div><div><br></div><div>I am on a mac and I know where the files are located, the headers are located at /Library/Frameworks/SDL2.framework/Headers</div><div><br></div><div>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.</div><div><br></div><div>Best,</div><div>Owen</div><div><br></div><div><br></div><div><br></div></div>