File tree Expand file tree Collapse file tree 4 files changed +14
-14
lines changed Expand file tree Collapse file tree 4 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ add_definitions(${LLVM_DEFINITIONS})
11
11
12
12
add_compile_options (-fexceptions -std=c++11 )
13
13
14
- add_library ( scalaNativeBindgen
15
- STATIC
14
+ add_executable ( bindgen
15
+ Main.cpp
16
16
visitor/ScalaFrontendAction.h
17
17
visitor/ScalaFrontendAction.cpp
18
18
visitor/ScalaFrontendActionFactory.h
@@ -38,15 +38,15 @@ add_library(scalaNativeBindgen
38
38
ir/Enum.h
39
39
ir/TypeAndName.cpp
40
40
ir/TypeAndName.h
41
- )
41
+ )
42
42
43
- add_executable (scalaBindgen
44
- Main.cpp
45
- )
43
+ set_target_properties (bindgen
44
+ PROPERTIES
45
+ OUTPUT_NAME scala-native-bindgen
46
+ )
46
47
47
- target_link_libraries (scalaBindgen
48
+ target_link_libraries (bindgen
48
49
PRIVATE
49
- scalaNativeBindgen
50
50
clangFrontend
51
51
clangTooling
52
- )
52
+ )
Original file line number Diff line number Diff line change @@ -33,4 +33,4 @@ WORKDIR /src/target
33
33
COPY . /src
34
34
RUN cmake .. && make VERBOSE=1
35
35
36
- ENTRYPOINT ["/src/target/scalaBindgen " ]
36
+ ENTRYPOINT ["/src/target/scala-native-bindgen " ]
Original file line number Diff line number Diff line change @@ -8,11 +8,11 @@ This tool generates Scala Native bindings from C headers. It's built upon clang
8
8
9
9
Calling the tool is pretty easy, you need to specify the file(s) and the name of the created bindings.
10
10
11
- ` ./scalaBindgen /usr/include/uv.h -name uv -- `
11
+ ` ./scala-native-bindgen /usr/include/uv.h -name uv -- `
12
12
13
13
Running the previous command wild also yield warnings along with the translation. To keep only the bindings please redirect the output to a file like this:
14
14
15
- ` ./scalaBindgen /usr/include/uv.h -name uv -- > uv.scala `
15
+ ` ./scala-native-bindgen /usr/include/uv.h -name uv -- > uv.scala `
16
16
17
17
## Building
18
18
@@ -24,7 +24,7 @@ mkdir -p target
24
24
cd target
25
25
cmake ..
26
26
make
27
- ./scalaBindgen /usr/include/ctype.h -name ctype --
27
+ ./scala-native-bindgen /usr/include/ctype.h -name ctype --
28
28
```
29
29
30
30
[ CMake ] : https://cmake.org/
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ val `scala-native-bindgen-tests` = project
16
16
.in(file(" ." ))
17
17
.settings(
18
18
fork in Test := true ,
19
- javaOptions in Test += " -Dbindgen.path=" + file(" ../target/scalaBindgen " ),
19
+ javaOptions in Test += " -Dbindgen.path=" + file(" ../target/scala-native-bindgen " ),
20
20
watchSources += WatchSource (
21
21
baseDirectory.value / " samples" ,
22
22
" *.h" || " *.scala" ,
You can’t perform that action at this time.
0 commit comments