File tree 2 files changed +9
-4
lines changed
2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,11 @@ if(NOT CMAKE_BUILD_TYPE)
5
5
"Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE)
6
6
endif ()
7
7
8
+ if (NOT CMAKE_INSTALL_PREFIX )
9
+ set (CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR} " CACHE STRING
10
+ "Directory to install zig to" FORCE)
11
+ endif ()
12
+
8
13
project (zig C CXX)
9
14
set (CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR} /cmake ${CMAKE_MODULE_PATH} )
10
15
Original file line number Diff line number Diff line change @@ -141,10 +141,10 @@ libc. Create demo games using Zig.
141
141
```
142
142
mkdir build
143
143
cd build
144
- cmake .. -DCMAKE_INSTALL_PREFIX=$(pwd)
144
+ cmake ..
145
145
make
146
146
make install
147
- . /zig build --build-file ../build.zig test
147
+ bin /zig build --build-file ../build.zig test
148
148
```
149
149
150
150
##### MacOS
@@ -154,9 +154,9 @@ brew install cmake llvm@6
154
154
brew outdated llvm@6 || brew upgrade llvm@6
155
155
mkdir build
156
156
cd build
157
- cmake .. -DCMAKE_PREFIX_PATH=/usr/local/opt/llvm@6/ -DCMAKE_INSTALL_PREFIX=$(pwd)
157
+ cmake .. -DCMAKE_PREFIX_PATH=/usr/local/opt/llvm@6/
158
158
make install
159
- . /zig build --build-file ../build.zig test
159
+ bin /zig build --build-file ../build.zig test
160
160
```
161
161
162
162
##### Windows
You can’t perform that action at this time.
0 commit comments