Commit Graph

2 Commits

Author SHA1 Message Date
fb98a740ea 自己编译 2019-10-21 22:24:25 +08:00
Andreas Schuh
e4f94fabd2 Enable build configuration with CMake (#18)
* 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
2019-06-04 21:04:00 +09:00