diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2019-11-29 16:12:39 +0000 |
|---|---|---|
| committer | s-ol <s-ol@users.noreply.github.com> | 2019-11-29 16:14:18 +0000 |
| commit | cf94ef1547aafccabf1cbbda9031217857e41963 (patch) | |
| tree | adc5f146ccc19e5fd60696aebcf4fd1d36ac806e | |
| parent | better jpm build (diff) | |
| download | janet-2geom-cf94ef1547aafccabf1cbbda9031217857e41963.tar.gz janet-2geom-cf94ef1547aafccabf1cbbda9031217857e41963.zip | |
move lib2geom build into janet build folder
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | include/janet_2geom.h (renamed from include/point.h) | 0 | ||||
| -rw-r--r-- | project.janet | 16 | ||||
| -rw-r--r-- | src/main.cpp | 2 | ||||
| -rw-r--r-- | src/point.cpp | 2 |
5 files changed, 10 insertions, 11 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..567609b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +build/ diff --git a/include/point.h b/include/janet_2geom.h index 769db11..769db11 100644 --- a/include/point.h +++ b/include/janet_2geom.h diff --git a/project.janet b/project.janet index 692a48d..b77a1fd 100644 --- a/project.janet +++ b/project.janet @@ -10,22 +10,20 @@ (def olddir (os/cwd)) (try (do - (shell "pwd") - (os/mkdir "lib2geom/build") - (os/cd "lib2geom/build") - (shell "cmake" ".." "-DCMAKE_CXX_FLAGS:STRING=-fPIC") + (os/mkdir "build/lib2geom") + (os/cd "build/lib2geom") + (shell "cmake" "../../lib2geom" "-DCMAKE_CXX_FLAGS:STRING=-fPIC") (shell "make" "2geom")) ([err] (print "Error compiling lib2geom.a: " err))) (os/cd olddir)) -(add-body "clean" - (shell "rm" "-rf" "lib2geom/build") - (print "Deleted lib2geom build directory.")) -(declare-native :name "geom" :source @["src/point.cpp" "src/main.cpp"] +(declare-native :name "geom" + :headers @["include/janet_2geom.h"] + :source @["src/point.cpp" "src/main.cpp"] :compiler "g++" :linker "g++" :cflags ["-Wall" "-Wextra" "-Iinclude" "-Ilib2geom/src"] - :lflags ["lib2geom/build/src/2geom/lib2geom.a" "-ldl" "-ldouble-conversion" "-lgsl" "-lgslcblas" "-lm"]) + :lflags ["build/lib2geom/src/2geom/lib2geom.a" "-ldl" "-ldouble-conversion" "-lgsl" "-lgslcblas" "-lm"]) (def- lname (string "build" sep "geom" statext)) (def- sname (string "build" sep "geom" modext)) diff --git a/src/main.cpp b/src/main.cpp index e0be6fd..e24d9a6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,4 +1,4 @@ -#include "point.h" +#include "janet_2geom.h" extern "C" { diff --git a/src/point.cpp b/src/point.cpp index 7fccfa0..0d375aa 100644 --- a/src/point.cpp +++ b/src/point.cpp @@ -1,4 +1,4 @@ -#include "point.h" +#include "janet_2geom.h" #include <sstream> |
