all repos — mgba @ 8ab698782386bd21f45ccc61bfd71dcafa4b0ce2

mGBA Game Boy Advance Emulator

CMake: Build fixes
Vicki Pfau vi@endrift.com
Mon, 27 Nov 2017 12:58:33 -0800
commit

8ab698782386bd21f45ccc61bfd71dcafa4b0ce2

parent

3842b35ab062cb183da0259a2c90decec62d5d09

3 files changed, 7 insertions(+), 3 deletions(-)

jump to
M CMakeLists.txtCMakeLists.txt

@@ -502,6 +502,7 @@ include_directories(AFTER ${ZLIB_INCLUDE_DIRS})

list(APPEND DEPENDENCY_LIB ${ZLIB_LIBRARIES}) set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS},zlib1g") set(HAVE_CRC32 ON) + list(APPEND OS_LIB ${ZLIB_LIBRARIES}) else() # zlib pulls in crc32 check_function_exists(crc32 HAVE_CRC32)

@@ -819,7 +820,7 @@ if(BUILD_OPENEMU)

find_library(FOUNDATION Foundation) find_library(OPENEMUBASE OpenEmuBase) file(GLOB OE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/platform/openemu/*.m) - add_library(${BINARY_NAME}-openemu MODULE ${CORE_SRC} ${OE_SRC}) + add_library(${BINARY_NAME}-openemu MODULE ${CORE_SRC} ${OS_SRC}) set_target_properties(${BINARY_NAME}-openemu PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/src/platform/openemu/Info.plist.in BUNDLE TRUE
M include/mgba/core/cheats.hinclude/mgba/core/cheats.h

@@ -14,8 +14,6 @@ #include <mgba/core/cpu.h>

#include <mgba/core/log.h> #include <mgba-util/vector.h> -#define MAX_ROM_PATCHES 4 - enum mCheatType { CHEAT_ASSIGN, CHEAT_ASSIGN_INDIRECT,

@@ -101,7 +99,10 @@ void mCheatRemoveSet(struct mCheatDevice*, struct mCheatSet*);

bool mCheatParseFile(struct mCheatDevice*, struct VFile*); bool mCheatSaveFile(struct mCheatDevice*, struct VFile*); + +#if !defined(MINIMAL_CORE) || MINIMAL_CORE < 2 void mCheatAutosave(struct mCheatDevice*); +#endif void mCheatRefresh(struct mCheatDevice*, struct mCheatSet*); void mCheatPressButton(struct mCheatDevice*, bool down);
M src/core/cheats.csrc/core/cheats.c

@@ -254,6 +254,7 @@ StringListDeinit(&directives);

return true; } +#if !defined(MINIMAL_CORE) || MINIMAL_CORE < 2 void mCheatAutosave(struct mCheatDevice* device) { if (!device->autosave) { return;

@@ -262,6 +263,7 @@ struct VFile* vf = mDirectorySetOpenSuffix(&device->p->dirs, device->p->dirs.cheats, ".cheats", O_WRONLY | O_CREAT | O_TRUNC);

mCheatSaveFile(device, vf); vf->close(vf); } +#endif void mCheatRefresh(struct mCheatDevice* device, struct mCheatSet* cheats) { if (!cheats->enabled) {