diff --git a/CMakeLists.txt b/CMakeLists.txt index b0a9f6c7..5d75614e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -306,7 +306,12 @@ endif() if(VITA) #set(VITA_FLAGS "-Ofast -mcpu=cortex-a9 -mfpu=neon -fgraphite-identity -floop-parallelize-all -floop-nest-optimize -ftree-parallelize-loops=3 -flto -fno-peephole2 -DNDEBUG") - set(VITA_FLAGS "-O2 -g -mcpu=cortex-a9 -mfpu=neon -fno-peephole2 -DNDEBUG") + if(CMAKE_BUILD_TYPE STREQUAL "Release") + set(VITA_FLAGS "-Ofast -mcpu=cortex-a9 -mfpu=neon -fgraphite-identity -floop-parallelize-all -floop-nest-optimize -ftree-parallelize-loops=3 -fno-peephole2 -DNDEBUG -ffile-prefix-map=${CMAKE_SOURCE_DIR}=.") + else() + set(VITA_FLAGS "-O2 -g -mcpu=cortex-a9 -mfpu=neon -fno-peephole2 -DNDEBUG") + add_definitions(-D_DEBUG) + endif() set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${VITA_FLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${VITA_FLAGS}") @@ -322,7 +327,6 @@ if(VITA) include("${CMAKE_SOURCE_DIR}/vita/vita.cmake") add_definitions(-D__unix) - add_definitions(-D_DEBUG) target_compile_definitions(${EXECUTABLE_NAME} PRIVATE _POSIX_C_SOURCE=200809) endif() diff --git a/vita/vita.cmake b/vita/vita.cmake index ec9fc774..253d277e 100644 --- a/vita/vita.cmake +++ b/vita/vita.cmake @@ -7,7 +7,12 @@ set(EXECUTABLE_NAME fallout2-ce) set(VITA_VERSION "01.00") set(VITA_MKSFOEX_FLAGS "${VITA_MKSFOEX_FLAGS}") -vita_create_self(${EXECUTABLE_NAME}.self ${EXECUTABLE_NAME}) + +if(CMAKE_BUILD_TYPE STREQUAL "Release") + vita_create_self(${EXECUTABLE_NAME}.self ${EXECUTABLE_NAME} STRIPPED) +else() + vita_create_self(${EXECUTABLE_NAME}.self ${EXECUTABLE_NAME}) +endif() vita_create_vpk(${EXECUTABLE_NAME}.vpk ${VITA_TITLEID} ${EXECUTABLE_NAME}.self VERSION ${VITA_VERSION}