aboutsummaryrefslogtreecommitdiffhomepage
path: root/content/2022-05-30-cmake-cargo-example/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'content/2022-05-30-cmake-cargo-example/CMakeLists.txt')
-rw-r--r--content/2022-05-30-cmake-cargo-example/CMakeLists.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/content/2022-05-30-cmake-cargo-example/CMakeLists.txt b/content/2022-05-30-cmake-cargo-example/CMakeLists.txt
new file mode 100644
index 0000000..6444ed0
--- /dev/null
+++ b/content/2022-05-30-cmake-cargo-example/CMakeLists.txt
@@ -0,0 +1,11 @@
+cmake_minimum_required(VERSION 3.14)
+project(calc)
+
+# Add libcalc (rust).
+add_subdirectory(libcalc)
+
+# Build calc add_executable.
+add_executable(calc calc.c)
+target_compile_options(calc PRIVATE -Wall -Wextra)
+# Link against rust lib.
+target_link_libraries(calc libcalc)