diff options
author | johannst <johannst@users.noreply.github.com> | 2024-04-05 23:16:19 +0000 |
---|---|---|
committer | johannst <johannst@users.noreply.github.com> | 2024-04-05 23:16:19 +0000 |
commit | 63d71256f83e5da6479d90d1bbdaf17ad6d31f02 (patch) | |
tree | 764f346960e00afaf945673a365d0063f64f29ff /development/cmake/module/CMakeLists.txt | |
parent | 1d01762f8b174573dd58e6da1630bd92bc193512 (diff) | |
download | notes-63d71256f83e5da6479d90d1bbdaf17ad6d31f02.tar.gz notes-63d71256f83e5da6479d90d1bbdaf17ad6d31f02.zip |
deploy: c660b71b9689af89bc09671e6a6de7f9943e2709
Diffstat (limited to 'development/cmake/module/CMakeLists.txt')
-rw-r--r-- | development/cmake/module/CMakeLists.txt | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/development/cmake/module/CMakeLists.txt b/development/cmake/module/CMakeLists.txt new file mode 100644 index 0000000..f52d282 --- /dev/null +++ b/development/cmake/module/CMakeLists.txt @@ -0,0 +1,27 @@ +cmake_minimum_required(VERSION 3.10) +project(hello-pkg) + +# Include as file. +include(cmake/moose.cmake) +# Include as module (search CMAKE_MODULE_PATH, then builtin paths). +include(moose) + +# -- Foo package --------------------------------------------------------------- + +# Find module (uses CMAKE_MODULE_PATH, Foo_DIR, builtin paths). +message("==> find_package(Foo MODULE)") +find_package(Foo MODULE) + +# Find config (uses CMAKE_PREFIX_PATH, Foo_DIR, builtin paths). +message("==> find_package(Foo CONFIG)") +find_package(Foo CONFIG REQUIRED) + +# -- Bar package --------------------------------------------------------------- + +# Find module (uses CMAKE_MODULE_PATH, Bar_DIR, builtin paths). +message("==> find_package(Bar MODULE)") +find_package(Bar MODULE) + +# Find config (uses CMAKE_PREFIX_PATH, Bar_DIR, builtin paths). +message("==> find_package(Bar CONFIG)") +find_package(Bar CONFIG REQUIRED) |