about summary refs log tree commit diff
path: root/third_party/nix/src/libmain/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/libmain/CMakeLists.txt')
-rw-r--r--third_party/nix/src/libmain/CMakeLists.txt25
1 files changed, 25 insertions, 0 deletions
diff --git a/third_party/nix/src/libmain/CMakeLists.txt b/third_party/nix/src/libmain/CMakeLists.txt
new file mode 100644
index 000000000000..825e8ee5d666
--- /dev/null
+++ b/third_party/nix/src/libmain/CMakeLists.txt
@@ -0,0 +1,25 @@
+# -*- mode: cmake; -*-
+add_library(nixmain SHARED)
+set_property(TARGET nixmain PROPERTY CXX_STANDARD 17)
+include_directories(${PROJECT_BINARY_DIR}) # for config.h
+target_include_directories(nixmain PUBLIC "${nix_SOURCE_DIR}/src")
+
+target_sources(nixmain
+  PUBLIC
+    common-args.hh
+    shared.hh
+  PRIVATE
+    common-args.cc
+    shared.cc
+    stack.cc
+)
+
+target_link_libraries(nixmain
+  nixstore
+  nixutil
+
+  absl::strings
+  glog
+)
+
+INSTALL(TARGETS nixmain DESTINATION lib)