summaryrefslogblamecommitdiff
path: root/CMakeLists.txt
blob: c1159245ae2f214eeeaa22d3429e928e34b4d65a (plain) (tree)
1
2
3
4
5
6
7
8
9
10









                                                                                                  
                                  



                             
                          





























                                                                
            
          




                               
                               




                                                    
#
#   Copyright (C) 2020-2021 Reiko Asakura. All Rights Reserved.
#
#   Moonshine
#

cmake_minimum_required(VERSION 3.19)

set(CMAKE_TOOLCHAIN_FILE "$ENV{SCE_PSP2_SDK_DIR}/host_tools/build/cmake/psp2-snc-toolchain.cmake")

project(moonshine LANGUAGES C CXX)

include(VitaDevelopmentSuite)
enable_language(EMD)
set(CMAKE_C_STANDARD 99)
set(CMAKE_CXX_STANDARD 11)

add_compile_options(
  -Xdiag=2 -Xquit=2
)

add_link_options(
  --prx-no-runtime-support
  --strip-duplicates
  --strip-unused-data
  --strip-report=strip-report.txt
)

include_directories(SYSTEM
  ${VDSUITE_USER_INCLUDE_DIRECTORIES}
)

link_directories(
  ${VDSUITE_LIBRARY_DIRECTORIES}
)

# Build self

add_compile_definitions(
  SCE_DBG_LOG_COMPONENT="\\033[0;33;1mMoonshine\\033[0m"
  SCE_DBG_LOGGING_ENABLED=$<IF:$<CONFIG:Release,MinSizeRel>,0,1>
)

add_library(moonshine MODULE
  moonshine.c
  moonshine.emd
  config.cpp
  opcode.c
  patch.c
)

target_link_libraries(moonshine
  taihen_stub
  SceIniFileProcessor_stub_weak
  SceKernel_stub
  $<$<NOT:$<CONFIG:Release,MinSizeRel>>:SceDbg_stub>
)

VDSuiteSignElf(moonshine.suprx moonshine)