Adding a few small fixes
This commit is contained in:
parent
0886b69ffe
commit
971cc5d7c7
@ -104,8 +104,8 @@ Since we've made a `ConfigVersion` file, this is a good place to install it too.
|
||||
configure_file(MyLibConfig.cmake.in MyLibConfig.cmake @ONLY)
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/MyLibConfig.cmake"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/Minuit2ConfigVersion.cmake"
|
||||
DESTINATION lib/cmake/MyLib
|
||||
)
|
||||
DESTINATION lib/cmake/MyLib
|
||||
)
|
||||
```
|
||||
|
||||
That's it! Now once you install a package, there will be files in `lib/cmake/MyLib` that CMake will search for (specifically, `MyLibConfig.cmake` and `MyLibConfigVersion.cmake`), and the targets file that config uses should be there as well.
|
||||
|
@ -67,3 +67,6 @@ execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
|
||||
There are several different methods to get CMake to download data, either at configure time or compile time. The latter is build directly into CMake with the x command. If you prefer configure time, see the [Crascit/DownloadProject](https://github.com/Crascit/DownloadProject) repository for a drop-in solution. Submodules work so well, though, that I've discontinued most of the downloads for things like GoogleTest and moved them to submodules. Auto downloads are harder to mimic if you
|
||||
don't have internet access, and they are often implemented in the build directory, wasting time and space if you have multiple build directories.
|
||||
|
||||
{% hint style='working' %}
|
||||
A new module in CMake 3.11, [FetchContent](https://cmake.org/cmake/help/v3.11/module/FetchContent.html) will build in this feature into CMake, stay tuned!
|
||||
{% endhint %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user