aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/development/cmake/module/Makefile
diff options
context:
space:
mode:
authorJohannes Stoelp <johannes.stoelp@gmail.com>2024-04-06 01:16:01 +0200
committerJohannes Stoelp <johannes.stoelp@gmail.com>2024-04-06 01:16:01 +0200
commitc660b71b9689af89bc09671e6a6de7f9943e2709 (patch)
treec14da0ff0caa101dd8906c231593c96c1204a3ec /src/development/cmake/module/Makefile
parent7f8aef4d417e427153caba4255a2282cb9dd30d9 (diff)
downloadnotes-c660b71b9689af89bc09671e6a6de7f9943e2709.tar.gz
notes-c660b71b9689af89bc09671e6a6de7f9943e2709.zip
cmake: freq vars + module example
Diffstat (limited to 'src/development/cmake/module/Makefile')
-rw-r--r--src/development/cmake/module/Makefile14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/development/cmake/module/Makefile b/src/development/cmake/module/Makefile
new file mode 100644
index 0000000..39f0389
--- /dev/null
+++ b/src/development/cmake/module/Makefile
@@ -0,0 +1,14 @@
+DBG ?= n
+CMAKE_DBG-y = -DCMAKE_FIND_DEBUG_MODE=1
+
+all:
+ @# CMAKE_MODULE_PATH for include() and find_package module flows.
+ @# CMAKE_PREFIX_PATH for find_package config flow.
+ @# Bar_DIR package specific for find_package config flow.
+ cmake . -B build -DCMAKE_MODULE_PATH="cmake;foo;bar" -DCMAKE_PREFIX_PATH="foo" -DBar_DIR=bar $(CMAKE_DBG-$(DBG))
+
+debug:
+ $(MAKE) all DBG=y
+
+clean:
+ $(RM) -r build