Skip to content

Commit d8d15c1

Browse files
committed
Add CMake build support.
1 parent f0bd06b commit d8d15c1

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build**

CMakeLists.txt

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
cmake_minimum_required(VERSION 3.0)
2+
3+
project(CreateFself)
4+
5+
set(CMAKE_VERBOSE_MAKEFILE ON)
6+
7+
if(WIN32)
8+
add_custom_target (
9+
OUTPUT ALL
10+
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/scripts
11+
COMMAND build.bat
12+
COMMENT "Building win32 create-fself"
13+
)
14+
else()
15+
add_custom_target(
16+
OUTPUT ALL
17+
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/scripts
18+
COMMAND build.sh
19+
COMMENT "Building other create-fself"
20+
)
21+
endif()

scripts/build.sh

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1+
#!/bin/bash -v
12
cd ../cmd/create-fself
23

4+
# Init
5+
#go mod init github.com/OpenOrbis/create-fself
6+
37
## Windows
48
GOOS=windows go build -o create-fself.exe -modfile=go-linux.mod
59
mv ./create-fself.exe ${OO_PS4_TOOLCHAIN}/bin/windows/create-fself.exe

0 commit comments

Comments
 (0)