
* add: CMake configuration files * doc: Variables affecting CMake configuration installation * fix: Rename CMake module and project -> subproject macro The problem is that macro/function definitions in CMake have global scope. Therefore, use a custom macro name rather than replacing the standard CMake command. * enh: Set LibLBFGS_LIBRARIES variable in LibLBFGSConfig.cmake For (older) libLBFGS installations that do not contain the CMake package configuration file, a FindLibLBFGS.cmake module will be needed which then sets LibLBFGS_LIBRARIES to the path of the actual library file instead of an imported CMake build target. * doc: Update CMakeLists.txt comment * fix: Do not inherit CMake options from parent project The parent project must explicitly set ${PROJECT_NAME}_${varname} before including the subproject to the value of the same named parent option ${varname} if super- and sub-project should both use the same value. * fix: Export of targets as part of parent project * fix: Do not import targets when liblbfgs TARGET exists * enh: Prefix Subproject module functions, use unique target names and non-imported target ALIAS * enh: Remove check if PROJECT_NAME is defined * fix: Update documentation of CMakeLists.txt * enh: Document LBFGS_INSTALL_HEADERS
16 lines
516 B
CMake
16 lines
516 B
CMake
## @PROJECT_NAME@ CMake configuration file
|
|
|
|
# library version information
|
|
set(@PROJECT_NAME@_VERSION_STRING "@PROJECT_VERSION@")
|
|
set(@PROJECT_NAME@_VERSION_MAJOR @PROJECT_VERSION_MAJOR@)
|
|
set(@PROJECT_NAME@_VERSION_MINOR @PROJECT_VERSION_MINOR@)
|
|
set(@PROJECT_NAME@_VERSION_PATCH @PROJECT_VERSION_PATCH@)
|
|
|
|
# import exported targets
|
|
if (NOT TARGET @PROJECT_NAME@::lib)
|
|
include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")
|
|
endif ()
|
|
|
|
# project libraries
|
|
set(@PROJECT_NAME@_LIBRARIES @PROJECT_NAME@::lib)
|