about summary refs log tree commit diff
path: root/third_party/nix/src/CMakeLists.txt
blob: 05386fa2dd7cdecb91e11ad3227b9f42b25fea4e (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# -*- mode: cmake; -*-

# The 'nix' binary is composed of various sources below this
# directory. In the previous build system, they were all built from
# this location and this setup mimics that (with the exception of the
# various Nix libraries).

add_subdirectory(proto)
add_subdirectory(libutil)
add_subdirectory(libstore)
add_subdirectory(libmain)
add_subdirectory(libexpr)

add_executable(nix)
set_property(TARGET nix PROPERTY CXX_STANDARD 17)
include_directories(${PROJECT_BINARY_DIR})
target_include_directories(nix PUBLIC "${nix_SOURCE_DIR}/src")

target_sources(nix
  PRIVATE
    nix/command.hh
    nix/legacy.hh
    nix-env/user-env.hh
    nix-store/dotgraph.hh
    nix-store/graphml.hh

    nix/add-to-store.cc
    nix/build.cc
    nix/cat.cc
    nix/command.cc
    nix/copy.cc
    nix/doctor.cc
    nix/dump-path.cc
    nix/edit.cc
    nix/eval.cc
    nix/hash.cc
    nix/installables.cc
    nix/legacy.cc
    nix/log.cc
    nix/ls.cc
    nix/main.cc
    nix/optimise-store.cc
    nix/path-info.cc
    nix/ping-store.cc
    nix/repl.cc
    nix/run.cc
    nix/search.cc
    nix/show-config.cc
    nix/show-derivation.cc
    nix/sigs.cc
    nix/upgrade-nix.cc
    nix/verify.cc
    nix/why-depends.cc

    build-remote/build-remote.cc
    nix-build/nix-build.cc
    nix-channel/nix-channel.cc
    nix-collect-garbage/nix-collect-garbage.cc
    nix-copy-closure/nix-copy-closure.cc
    nix-daemon/nix-daemon.cc
    nix-daemon/nix-daemon-proto.cc
    nix-env/nix-env.cc
    nix-env/user-env.cc
    nix-instantiate/nix-instantiate.cc
    nix-prefetch-url/nix-prefetch-url.cc
    nix-store/dotgraph.cc
    nix-store/graphml.cc
    nix-store/nix-store.cc
)

target_link_libraries(nix
  nixexpr
  nixmain
  nixstore
  nixutil

  absl::strings
  editline
  glog
)

INSTALL(TARGETS nix DESTINATION bin)