Skip to content

Commit

Permalink
Use cmake instead of make
Browse files Browse the repository at this point in the history
  • Loading branch information
Crayon2000 committed Sep 23, 2023
1 parent bc75f1c commit dba7608
Show file tree
Hide file tree
Showing 11 changed files with 65 additions and 5,545 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,16 @@ jobs:
run: bash ./.github/workflows/update.sh

- name: Build application
run: make
run: |
mkdir --parents build
/opt/devkitpro/portlibs/wiiu/bin/powerpc-eabi-cmake -B build
cmake --build build -j $(nproc)
- name: Prepare artifact
run: |
mkdir --parents artifact/MiisendU-Wii-U
mv --verbose MiisendU-Wii-U.rpx artifact/MiisendU-Wii-U/MiisendU-Wii-U.rpx
mv --verbose MiisendU-Wii-U.wuhb artifact/MiisendU-Wii-U/MiisendU-Wii-U.wuhb
mv --verbose build/MiisendU-Wii-U.rpx artifact/MiisendU-Wii-U/MiisendU-Wii-U.rpx
mv --verbose build/MiisendU-Wii-U.wuhb artifact/MiisendU-Wii-U/MiisendU-Wii-U.wuhb
cp --verbose meta/* artifact/MiisendU-Wii-U
- uses: actions/upload-artifact@v3
Expand Down
13 changes: 8 additions & 5 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
{
"label": "Build",
"type": "shell",
"command": "make",
"command": "cmake",
"args": [
"build"
"--build",
"${workspaceRoot}/build"
],
"group": {
"kind": "build",
Expand All @@ -20,11 +21,13 @@
{
"label": "Clean",
"type": "shell",
"command": "make",
"command": "cmake",
"args": [
"--build",
"${workspaceRoot}/build",
"--target",
"clean"
],
"problemMatcher": []
]
}
]
}
48 changes: 48 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
cmake_minimum_required(VERSION 3.18)
project(MiisendU-Wii-U)

find_package(PkgConfig REQUIRED)
pkg_check_modules(JANSSON REQUIRED jansson)

include(FetchContent)
FetchContent_Declare(
inih
GIT_REPOSITORY https://github.com/benhoyt/inih.git
GIT_TAG r57
)
FetchContent_MakeAvailable(inih)

add_executable(MiisendU-Wii-U)

target_sources(MiisendU-Wii-U PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/source/main.c
${CMAKE_CURRENT_SOURCE_DIR}/source/console.c
${CMAKE_CURRENT_SOURCE_DIR}/source/udp.c
${CMAKE_CURRENT_SOURCE_DIR}/source/vpad_to_json.cpp
${inih_SOURCE_DIR}/ini.c
)

target_include_directories(MiisendU-Wii-U SYSTEM PRIVATE
${JANSSON_INCLUDE_DIRS}
${inih_SOURCE_DIR}
)

target_include_directories(MiisendU-Wii-U PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/source
)

target_link_libraries(MiisendU-Wii-U PRIVATE
${JANSSON_LIBRARIES}
)

wut_create_rpx(MiisendU-Wii-U)

wut_create_wuhb(MiisendU-Wii-U
CONTENT
NAME "MiisendU Wii U"
SHORTNAME "MiisendU"
AUTHOR "Crayon"
ICON "wuhb/icon.png"
TVSPLASH "wuhb/tv-image.png"
DRCSPLASH "wuhb/drc-image.png"
)
181 changes: 0 additions & 181 deletions Makefile

This file was deleted.

4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,7 @@ Prerequisites:
To compile:

```bash
> make
mkdir --parents build
/opt/devkitpro/portlibs/wiiu/bin/powerpc-eabi-cmake -B build
cmake --build build
```
23 changes: 0 additions & 23 deletions source/vendor/fmt/LICENSE.rst

This file was deleted.

Loading

0 comments on commit dba7608

Please sign in to comment.