Work together to install both targets (a library in our case) and a CMakeįile designed to make it easy to import the targets into another CMake project.įirst, in the install(TARGETS) command we will specify the target, The install(TARGETS) and install(EXPORT) commands ![]() Relocatable Packages section for more details. Otherwise, when installed, include the include directory. That if we're building the library include the current source directory. Will export a path that is specific to the current build directoryĪnd will not be valid for other projects. If we don't do this, when CMake creates the export information it ![]() ![]() We need to tell CMake that we want to use different include directoriesĭepending on if we're building the library or using it from an installed Target_include_directories( MathFunctions PUBLIC "$" "$" )
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |