aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/development/cmake/module/CMakeLists.txt
blob: f52d282b6a7921eb1ca0b68cf211cb064176e8c0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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)