CMake: Build fixes

This commit is contained in:
Vicki Pfau 2017-11-27 12:58:33 -08:00
parent 3842b35ab0
commit 8ab6987823
3 changed files with 7 additions and 3 deletions

View File

@ -502,6 +502,7 @@ if(USE_ZLIB)
list(APPEND DEPENDENCY_LIB ${ZLIB_LIBRARIES}) list(APPEND DEPENDENCY_LIB ${ZLIB_LIBRARIES})
set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS},zlib1g") set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS},zlib1g")
set(HAVE_CRC32 ON) set(HAVE_CRC32 ON)
list(APPEND OS_LIB ${ZLIB_LIBRARIES})
else() else()
# zlib pulls in crc32 # zlib pulls in crc32
check_function_exists(crc32 HAVE_CRC32) check_function_exists(crc32 HAVE_CRC32)
@ -819,7 +820,7 @@ if(BUILD_OPENEMU)
find_library(FOUNDATION Foundation) find_library(FOUNDATION Foundation)
find_library(OPENEMUBASE OpenEmuBase) find_library(OPENEMUBASE OpenEmuBase)
file(GLOB OE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/platform/openemu/*.m) 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 set_target_properties(${BINARY_NAME}-openemu PROPERTIES
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/src/platform/openemu/Info.plist.in MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/src/platform/openemu/Info.plist.in
BUNDLE TRUE BUNDLE TRUE

View File

@ -14,8 +14,6 @@ CXX_GUARD_START
#include <mgba/core/log.h> #include <mgba/core/log.h>
#include <mgba-util/vector.h> #include <mgba-util/vector.h>
#define MAX_ROM_PATCHES 4
enum mCheatType { enum mCheatType {
CHEAT_ASSIGN, CHEAT_ASSIGN,
CHEAT_ASSIGN_INDIRECT, CHEAT_ASSIGN_INDIRECT,
@ -101,7 +99,10 @@ void mCheatRemoveSet(struct mCheatDevice*, struct mCheatSet*);
bool mCheatParseFile(struct mCheatDevice*, struct VFile*); bool mCheatParseFile(struct mCheatDevice*, struct VFile*);
bool mCheatSaveFile(struct mCheatDevice*, struct VFile*); bool mCheatSaveFile(struct mCheatDevice*, struct VFile*);
#if !defined(MINIMAL_CORE) || MINIMAL_CORE < 2
void mCheatAutosave(struct mCheatDevice*); void mCheatAutosave(struct mCheatDevice*);
#endif
void mCheatRefresh(struct mCheatDevice*, struct mCheatSet*); void mCheatRefresh(struct mCheatDevice*, struct mCheatSet*);
void mCheatPressButton(struct mCheatDevice*, bool down); void mCheatPressButton(struct mCheatDevice*, bool down);

View File

@ -254,6 +254,7 @@ bool mCheatSaveFile(struct mCheatDevice* device, struct VFile* vf) {
return true; return true;
} }
#if !defined(MINIMAL_CORE) || MINIMAL_CORE < 2
void mCheatAutosave(struct mCheatDevice* device) { void mCheatAutosave(struct mCheatDevice* device) {
if (!device->autosave) { if (!device->autosave) {
return; return;
@ -262,6 +263,7 @@ void mCheatAutosave(struct mCheatDevice* device) {
mCheatSaveFile(device, vf); mCheatSaveFile(device, vf);
vf->close(vf); vf->close(vf);
} }
#endif
void mCheatRefresh(struct mCheatDevice* device, struct mCheatSet* cheats) { void mCheatRefresh(struct mCheatDevice* device, struct mCheatSet* cheats) {
if (!cheats->enabled) { if (!cheats->enabled) {