You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With these changes, building asar now also builds a static library version of it.
The name of the library will be asar-static.lib/libasar-static.a .
This behavior is enabled by default (as everything else) and can be disabled.
To do this, add -DASAR_GEN_LIB=OFF to the cmake configuration command.
Copy file name to clipboardExpand all lines: README.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,13 @@ If you'd rather not build from source, check out the [Releases](https://github.c
13
13
## Asar DLL
14
14
Asar can also be built as a DLL. This makes it easier and faster to use in other programs (such as a sprite insertion tool). You can find documentation on the DLL API in the respective bindings (asardll.h, asar.cs, asar.py).
15
15
16
+
## Asar as a static library
17
+
Asar can also be build as a static library. All "out-facing" functions are in interface-lib.h. This is useful for embedding Asar in other programs which don't want to use DLLs. The easiest way to add asar as a static library to your project, assuming you are using CMake (at least 3.11), is to use [FetchContent](https://cmake.org/cmake/help/latest/module/FetchContent.html) to fetch the source code, then add the following to your CMakeLists.txt:
18
+
```CMake
19
+
target_include_directories(YourTarget PUBLIC ${asar_SOURCE_DIR}/src)
20
+
```
21
+
to be able to include the header files. It is also recommended to add `set(ASAR_TESTING_DISABLED TRUE)` to your CMakeLists.txt to disable building tests.
22
+
16
23
## Folder layout
17
24
*`docs` contains the source of the manual and changelog.
18
25
(You can view an online version of the manual [here](https://rpghacker.github.io/asar/manual/) and an online version of the changelog [here](https://rpghacker.github.io/asar/changelog/)).
0 commit comments