all repos — mgba @ bdf6d7f7ec86fa7e8d934333455f44ceb53b2b2e

mGBA Game Boy Advance Emulator

All: Fix CMake files to not use function defined in CMake 2.8.11
Jeffrey Pfau jeffrey@endrift.com
Thu, 12 Mar 2015 01:09:12 -0700
commit

bdf6d7f7ec86fa7e8d934333455f44ceb53b2b2e

parent

3c652a10b5c2872b6834ccfa5fe464f3f337c159

3 files changed, 6 insertions(+), 9 deletions(-)

jump to
M CMakeLists.txtCMakeLists.txt

@@ -305,7 +305,7 @@ if(BUILD_SHARED)

add_library(${BINARY_NAME} SHARED ${SRC}) if(BUILD_STATIC) add_library(${BINARY_NAME}-static STATIC ${SRC}) - target_compile_definitions(${BINARY_NAME}-static PRIVATE ${FEATURE_DEFINES}) + set_target_properties(${BINARY_NAME}-static PROPERTIES COMPILE_DEFINITIONS "${FEATURE_DEFINES}") install(TARGETS ${BINARY_NAME}-static DESTINATION lib COMPONENT lib${BINARY_NAME}) endif() else()

@@ -313,15 +313,13 @@ add_library(${BINARY_NAME} STATIC ${SRC})

endif() target_link_libraries(${BINARY_NAME} m ${DEBUGGER_LIB} ${OS_LIB} ${DEPENDENCY_LIB}) -target_compile_definitions(${BINARY_NAME} PRIVATE ${FEATURE_DEFINES}) install(TARGETS ${BINARY_NAME} DESTINATION lib COMPONENT lib${BINARY_NAME}) -set_target_properties(${BINARY_NAME} PROPERTIES VERSION ${LIB_VERSION_STRING} SOVERSION ${LIB_VERSION_ABI}) +set_target_properties(${BINARY_NAME} PROPERTIES VERSION ${LIB_VERSION_STRING} SOVERSION ${LIB_VERSION_ABI} COMPILE_DEFINITIONS "${FEATURE_DEFINES}") if(BUILD_LIBRETRO) file(GLOB RETRO_SRC ${CMAKE_SOURCE_DIR}/src/platform/libretro/*.c) add_library(${BINARY_NAME}_libretro SHARED ${CORE_SRC} ${RETRO_SRC}) - set_target_properties(${BINARY_NAME}_libretro PROPERTIES PREFIX "" COMPILE_DEFINITIONS "") - target_compile_definitions(${BINARY_NAME}_libretro PRIVATE COLOR_16_BIT;COLOR_5_6_5 PUBLIC "" INTERFACE "") + set_target_properties(${BINARY_NAME}_libretro PROPERTIES PREFIX "" COMPILE_DEFINITIONS "COLOR_16_BIT;COLOR_5_6_5") target_link_libraries(${BINARY_NAME}_libretro m ${OS_LIB}) endif()
M src/platform/qt/CMakeLists.txtsrc/platform/qt/CMakeLists.txt

@@ -109,8 +109,7 @@ if(WIN32)

list(APPEND RESOURCES ${CMAKE_SOURCE_DIR}/res/mgba.rc) endif() add_executable(${BINARY_NAME}-qt WIN32 MACOSX_BUNDLE main.cpp ${CMAKE_SOURCE_DIR}/res/mgba.icns ${SOURCE_FILES} ${PLATFORM_SRC} ${UI_FILES} ${AUDIO_SRC} ${RESOURCES}) -target_compile_definitions(${BINARY_NAME}-qt PRIVATE ${FEATURE_DEFINES}) -set_target_properties(${BINARY_NAME}-qt PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/res/info.plist.in) +set_target_properties(${BINARY_NAME}-qt PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/res/info.plist.in COMPILE_DEFINITIONS "${FEATURE_DEFINES}") list(APPEND QT_LIBRARIES Qt5::Widgets Qt5::OpenGL) target_link_libraries(${BINARY_NAME}-qt ${PLATFORM_LIBRARY} ${OPENGL_LIBRARY} ${BINARY_NAME} ${QT_LIBRARIES})
M src/platform/sdl/CMakeLists.txtsrc/platform/sdl/CMakeLists.txt

@@ -38,7 +38,7 @@ set(EGL_MAIN_SRC ${CMAKE_SOURCE_DIR}/src/platform/sdl/egl-sdl.c)

set(EGL_LIBRARY "-lEGL -lGLESv2 -lbcm_host") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fgnu89-inline") add_executable(${BINARY_NAME}-rpi ${PLATFORM_SRC} ${MAIN_SRC} ${EGL_MAIN_SRC}) - target_compile_definitions(${BINARY_NAME}-rpi PRIVATE ${FEATURE_DEFINES}) + set_target_properties(${BINARY_NAME}-rpi PROPERTIES COMPILE_DEFINITIONS "${FEATURE_DEFINES}") target_link_libraries(${BINARY_NAME}-rpi ${BINARY_NAME} ${PLATFORM_LIBRARY} ${EGL_LIBRARY}) install(TARGETS ${BINARY_NAME}-rpi DESTINATION bin COMPONENT ${BINARY_NAME}-rpi) endif()

@@ -53,7 +53,7 @@ include_directories(${OPENGL_INCLUDE_DIR})

endif() add_executable(${BINARY_NAME}-sdl WIN32 ${PLATFORM_SRC} ${MAIN_SRC}) -target_compile_definitions(${BINARY_NAME}-sdl PRIVATE ${FEATURE_DEFINES}) +set_target_properties(${BINARY_NAME}-sdl PROPERTIES COMPILE_DEFINITIONS "${FEATURE_DEFINES}") target_link_libraries(${BINARY_NAME}-sdl ${BINARY_NAME} ${PLATFORM_LIBRARY} ${OPENGL_LIBRARY}) set_target_properties(${BINARY_NAME}-sdl PROPERTIES OUTPUT_NAME ${BINARY_NAME}) install(TARGETS ${BINARY_NAME}-sdl DESTINATION bin COMPONENT ${BINARY_NAME}-sdl)