Of course CMake being what it is there are a lot of inner workings and edge cases which can be covered when using find_package, so be sure to refer to the original documentation if stuck. You should mention all your source files in the arguments of addexecutable. addlibrary (Hello hello. vre at 14:34 Yes but nothing in osg/lib matches the globing expression Hugal31 at 14:35 Good point. That is all that is to know to get started. Regarding includedirectories This directive corresponds to -I compiler flag and allows compiler to find header files, i.e. Any number of sources could be listed here. From the docs: By default GLOBRECURSE omits directories from result list - setting LISTDIRECTORIES to true adds directories to result list. Target_link_libraries(SomeExecutable PRIVATE libImagePipeline::libImagePipeline) Now, the library is available like a normal target defined in CMake and can be linked to any other existing target with target_link_libraries. The REQUIRED keyword marking that the library is essential for the build and that CMake will stop with an error if the package is not found. Utilizing these new features often involves a complicated chain of CMake. A configuration include file can be created using configurefile . Recently LLVM and Clang have been adding some more complicated build system features. The details on how to use it is explained at the end of this article, but it looks something like this: list(APPEND CMAKE_MODULE_PATH "$/CMake/")įrom here on the package can be included by calling find_package. addlibrary ( STATIC SHARED MODULE EXCLUDEFROMALL
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |