-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompile.sh
executable file
·32 lines (26 loc) · 1.14 KB
/
compile.sh
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
#!/bin/zsh
#Pre-requisite, must be installed in the system :
# (*) Cmake
# (*) Ninja
# (*) LLVM + Clang
# (*) GLFW
# (*) Command_Line_Tools_for_Xcode_12.dmg
export PATH=~/MyProjects/clang+llvm-10.0.0-x86_64-apple-darwin/bin:~/MyProjects/Ninja1.10.1/ninja:$PATH
export CC=clang
export CXX=clang++
export SDKROOT='/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk'
export CPATH='/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk:/opt/local/include'
export LIBRARY_PATH='/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib:/opt/local/lib'
#Use cmake to perform OS operation
cmake -E rm -rf build #delete directory build
cmake -E make_directory build #create directory build
#Use cmake to run the generator
#cmake -E chdir build cmake -E time cmake ../ #run cmake to configure in directory 'build"
cmake -E time cmake -G Ninja . -B build #Use Ninja as generator on the CMakeLists in current directory, and generate under directory 'build'
#Use cmake to run the build
#ninja -j 4 -C build
#ninja -j 4 install
cmake -E time cmake --build build
echo -e "\n********* STARTING ********\n"
build/./GLFWtriangle-vulkan
echo -e "\n\n"