-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #78 from dzcode-io/69-use-conan-package-manager-to…
…-link-jsmn Use Conan package manager to link jsmn
- Loading branch information
Showing
12 changed files
with
157 additions
and
597 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,15 +14,38 @@ jobs: | |
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up build environment | ||
- name: Get Conan | ||
uses: turtlebrowser/[email protected] | ||
|
||
- name: Create default profile | ||
run: conan profile detect --force | ||
|
||
- name: Install dependencies | ||
run: | | ||
cd c | ||
mkdir -p build | ||
cd build | ||
cmake .. | ||
conan install . --output-folder=build --build=missing | ||
- name: Set up build environment | ||
run: | | ||
cd c/build | ||
sh conanbuild.sh | ||
cmake .. -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release | ||
- name: Build and run build script | ||
run: | | ||
cd c/build | ||
make build | ||
cd .. | ||
./build/build | ||
- name: Build and run tests | ||
run: | | ||
cd c/build | ||
make test | ||
./test | ||
- name: Build and run example | ||
run: | | ||
cd c/build | ||
make example | ||
./example |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,12 @@ | ||
{ | ||
"rust-analyzer.checkOnSave": true, | ||
"rust-analyzer.check.overrideCommand": ["cargo", "clippy", "--message-format=json"] | ||
"rust-analyzer.check.overrideCommand": [ | ||
"cargo", | ||
"clippy", | ||
"--message-format=json" | ||
], | ||
"files.associations": { | ||
"*.h": "c", | ||
}, | ||
"cmake.sourceDirectory": "${workspaceFolder}/c" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
build/ | ||
CMakeUserPresets.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[requires] | ||
jsmn/1.1.0 | ||
libunistring/1.1 | ||
|
||
[generators] | ||
CMakeDeps | ||
CMakeToolchain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
add_library(helpers SHARED file.h my_string.h my_string.c) | ||
set_target_properties(helpers PROPERTIES LINKER_LANGUAGE C) | ||
find_package(libunistring REQUIRED) | ||
target_link_libraries(helpers PRIVATE libunistring::libunistring) |
Oops, something went wrong.