Skip to content

Commit

Permalink
Add CMake build support.
Browse files Browse the repository at this point in the history
  • Loading branch information
kiwidoggie committed Dec 17, 2021
1 parent f0bd06b commit d8d15c1
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build**
21 changes: 21 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
cmake_minimum_required(VERSION 3.0)

project(CreateFself)

set(CMAKE_VERBOSE_MAKEFILE ON)

if(WIN32)
add_custom_target (
OUTPUT ALL
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/scripts
COMMAND build.bat
COMMENT "Building win32 create-fself"
)
else()
add_custom_target(
OUTPUT ALL
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/scripts
COMMAND build.sh
COMMENT "Building other create-fself"
)
endif()
4 changes: 4 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/bin/bash -v
cd ../cmd/create-fself

# Init
#go mod init github.com/OpenOrbis/create-fself

## Windows
GOOS=windows go build -o create-fself.exe -modfile=go-linux.mod
mv ./create-fself.exe ${OO_PS4_TOOLCHAIN}/bin/windows/create-fself.exe
Expand Down

0 comments on commit d8d15c1

Please sign in to comment.