Skip to content

Commit 61a5804

Browse files
committed
Rename the executable to scala-native-bindgen
1 parent 5323f41 commit 61a5804

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

CMakeLists.txt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ add_definitions(${LLVM_DEFINITIONS})
1111

1212
add_compile_options(-fexceptions -std=c++11)
1313

14-
add_library(scalaNativeBindgen
15-
STATIC
14+
add_executable(bindgen
15+
Main.cpp
1616
visitor/ScalaFrontendAction.h
1717
visitor/ScalaFrontendAction.cpp
1818
visitor/ScalaFrontendActionFactory.h
@@ -38,15 +38,15 @@ add_library(scalaNativeBindgen
3838
ir/Enum.h
3939
ir/TypeAndName.cpp
4040
ir/TypeAndName.h
41-
)
41+
)
4242

43-
add_executable(scalaBindgen
44-
Main.cpp
45-
)
43+
set_target_properties(bindgen
44+
PROPERTIES
45+
OUTPUT_NAME scala-native-bindgen
46+
)
4647

47-
target_link_libraries(scalaBindgen
48+
target_link_libraries(bindgen
4849
PRIVATE
49-
scalaNativeBindgen
5050
clangFrontend
5151
clangTooling
52-
)
52+
)

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ WORKDIR /src/target
3333
COPY . /src
3434
RUN cmake .. && make VERBOSE=1
3535

36-
ENTRYPOINT ["/src/target/scalaBindgen"]
36+
ENTRYPOINT ["/src/target/scala-native-bindgen"]

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ This tool generates Scala Native bindings from C headers. It's built upon clang
88

99
Calling the tool is pretty easy, you need to specify the file(s) and the name of the created bindings.
1010

11-
`./scalaBindgen /usr/include/uv.h -name uv --`
11+
`./scala-native-bindgen /usr/include/uv.h -name uv --`
1212

1313
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:
1414

15-
`./scalaBindgen /usr/include/uv.h -name uv -- > uv.scala`
15+
`./scala-native-bindgen /usr/include/uv.h -name uv -- > uv.scala`
1616

1717
## Building
1818

@@ -24,7 +24,7 @@ mkdir -p target
2424
cd target
2525
cmake ..
2626
make
27-
./scalaBindgen /usr/include/ctype.h -name ctype --
27+
./scala-native-bindgen /usr/include/ctype.h -name ctype --
2828
```
2929

3030
[CMake]: https://cmake.org/

tests/build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ val `scala-native-bindgen-tests` = project
1616
.in(file("."))
1717
.settings(
1818
fork in Test := true,
19-
javaOptions in Test += "-Dbindgen.path=" + file("../target/scalaBindgen"),
19+
javaOptions in Test += "-Dbindgen.path=" + file("../target/scala-native-bindgen"),
2020
watchSources += WatchSource(
2121
baseDirectory.value / "samples",
2222
"*.h" || "*.scala",

0 commit comments

Comments
 (0)