2011-02-20 13:31:49 +00:00
|
|
|
# The project's name is VBA-M it uses C and C++ code
|
|
|
|
PROJECT(VBA-M C CXX)
|
2010-03-15 03:36:45 +00:00
|
|
|
|
2011-02-20 13:31:49 +00:00
|
|
|
cmake_minimum_required( VERSION 2.6.0 )
|
2008-06-06 18:56:41 +00:00
|
|
|
if( COMMAND cmake_policy )
|
|
|
|
cmake_policy( SET CMP0003 NEW )
|
2008-06-08 20:46:25 +00:00
|
|
|
cmake_policy( SET CMP0005 OLD )
|
2008-06-06 18:56:41 +00:00
|
|
|
endif( COMMAND cmake_policy )
|
|
|
|
SET( CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeScripts )
|
2015-03-27 17:48:42 +00:00
|
|
|
#Output all binaries at top level
|
|
|
|
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR})
|
2008-06-06 10:17:20 +00:00
|
|
|
|
2011-02-24 11:14:59 +00:00
|
|
|
option( ENABLE_SDL "Build the SDL port" ON )
|
2015-05-18 03:04:34 +00:00
|
|
|
option( ENABLE_GTK "Build the GTK+ GUI" OFF )
|
|
|
|
option( ENABLE_WX "Build the wxWidgets port" ON )
|
2011-02-24 11:14:59 +00:00
|
|
|
option( ENABLE_DEBUGGER "Enable the debugger" ON )
|
2011-02-24 13:06:17 +00:00
|
|
|
option( ENABLE_NLS "Enable translations" ON )
|
2011-02-24 11:14:59 +00:00
|
|
|
option( ENABLE_ASM_CORE "Enable x86 ASM CPU cores" OFF )
|
|
|
|
option( ENABLE_ASM_SCALERS "Enable x86 ASM graphic filters" OFF )
|
2013-09-24 11:49:26 +00:00
|
|
|
option( ENABLE_LINK "Enable GBA linking functionality" OFF )
|
2011-02-24 11:14:59 +00:00
|
|
|
option( ENABLE_LIRC "Enable LIRC support" OFF )
|
2012-10-03 18:00:45 +00:00
|
|
|
option( ENABLE_FFMPEG "Enable ffmpeg A/V recording" OFF )
|
2011-05-24 07:39:29 +00:00
|
|
|
if(ENABLE_ASM_SCALERS)
|
|
|
|
option( ENABLE_MMX "Enable MMX" OFF )
|
|
|
|
endif(ENABLE_ASM_SCALERS)
|
|
|
|
option( ENABLE_GBA_LOGGING "Enable extended GBA logging" ON )
|
|
|
|
if( ENABLE_GBA_LOGGING )
|
|
|
|
ADD_DEFINITIONS (-DGBA_LOGGING )
|
|
|
|
endif( ENABLE_GBA_LOGGING )
|
|
|
|
if(ENABLE_MMX)
|
|
|
|
ADD_DEFINITIONS (-DMMX)
|
|
|
|
endif(ENABLE_MMX)
|
2011-02-24 11:14:59 +00:00
|
|
|
|
|
|
|
# The SDL port can't be built without debugging support
|
|
|
|
if( NOT ENABLE_DEBUGGER AND ENABLE_SDL )
|
|
|
|
message( SEND_ERROR "The SDL port can't be built without debugging support" )
|
|
|
|
endif( NOT ENABLE_DEBUGGER AND ENABLE_SDL )
|
2008-06-06 10:17:20 +00:00
|
|
|
|
2011-02-24 11:14:59 +00:00
|
|
|
# Set the version number with -DVERSION=X.X.X-uber
|
2008-06-06 10:17:20 +00:00
|
|
|
IF( NOT VERSION )
|
2015-05-18 02:41:21 +00:00
|
|
|
SET( VERSION "2.0.0-SVN" )
|
|
|
|
|
2011-12-27 21:02:22 +00:00
|
|
|
IF(EXISTS "${CMAKE_SOURCE_DIR}/.svn")
|
|
|
|
FIND_PACKAGE(Subversion)
|
|
|
|
IF(SUBVERSION_FOUND)
|
|
|
|
Subversion_WC_INFO(${CMAKE_SOURCE_DIR} SVN_INFO)
|
2015-05-18 02:41:21 +00:00
|
|
|
SET( VERSION "2.0.0-SVN${SVN_INFO_WC_REVISION}" )
|
2011-12-27 21:02:22 +00:00
|
|
|
ENDIF(SUBVERSION_FOUND)
|
|
|
|
ENDIF(EXISTS "${CMAKE_SOURCE_DIR}/.svn")
|
2008-06-06 10:17:20 +00:00
|
|
|
ENDIF( NOT VERSION )
|
|
|
|
|
2008-09-26 17:23:12 +00:00
|
|
|
# Fill in SDLMAIN_LIBRARY on OS X manually to avoid using SDLMain.m
|
2008-10-20 13:40:29 +00:00
|
|
|
# OS X users will have to compile and install SDL from source.
|
2015-05-09 14:09:29 +00:00
|
|
|
if( APPLE AND ENABLE_SDL )
|
2011-02-24 11:14:59 +00:00
|
|
|
SET(SDLMAIN_LIBRARY "-lSDLmain")
|
2015-05-09 14:09:29 +00:00
|
|
|
endif( APPLE AND ENABLE_SDL )
|
2008-09-26 17:23:12 +00:00
|
|
|
|
2011-02-24 11:14:59 +00:00
|
|
|
# Check for nasm
|
|
|
|
if( ENABLE_ASM_SCALERS )
|
|
|
|
ENABLE_LANGUAGE( ASM_NASM )
|
|
|
|
endif( ENABLE_ASM_SCALERS )
|
|
|
|
|
2010-03-15 03:36:45 +00:00
|
|
|
# Look for some dependencies using CMake scripts
|
2008-06-06 10:17:20 +00:00
|
|
|
FIND_PACKAGE ( ZLIB REQUIRED )
|
|
|
|
FIND_PACKAGE ( PNG REQUIRED )
|
|
|
|
FIND_PACKAGE ( OpenGL REQUIRED )
|
2008-06-06 16:42:31 +00:00
|
|
|
FIND_PACKAGE ( SDL REQUIRED )
|
2011-02-24 11:14:59 +00:00
|
|
|
|
|
|
|
if( ENABLE_LINK )
|
2015-05-06 01:27:09 +00:00
|
|
|
FIND_PACKAGE ( SFML 2 COMPONENTS network system )
|
2011-02-24 11:14:59 +00:00
|
|
|
endif( ENABLE_LINK )
|
2011-05-25 11:55:46 +00:00
|
|
|
# set the standard libraries all ports use
|
|
|
|
SET(VBAMCORE_LIBS
|
|
|
|
vbamcore
|
|
|
|
fex
|
|
|
|
${SDL_LIBRARY}
|
2015-05-06 01:27:09 +00:00
|
|
|
${SFML_LIBRARIES}
|
2011-05-25 11:55:46 +00:00
|
|
|
${OPENGL_LIBRARIES}
|
|
|
|
${ZLIB_LIBRARY}
|
2015-03-27 17:48:42 +00:00
|
|
|
${PNG_LIBRARY}
|
|
|
|
)
|
2011-02-24 11:14:59 +00:00
|
|
|
|
2011-05-24 07:39:29 +00:00
|
|
|
if(ENABLE_FFMPEG)
|
|
|
|
FIND_PACKAGE ( PkgConfig REQUIRED )
|
|
|
|
|
|
|
|
PKG_CHECK_MODULES(FFMPEG REQUIRED libavcodec libavformat libswscale libavutil)
|
|
|
|
endif(ENABLE_FFMPEG)
|
|
|
|
|
|
|
|
if(NOT ENABLE_FFMPEG)
|
|
|
|
ADD_DEFINITIONS(-DNO_FFMPEG)
|
|
|
|
endif(NOT ENABLE_FFMPEG)
|
|
|
|
|
2011-02-24 11:14:59 +00:00
|
|
|
IF( ENABLE_LIRC )
|
2008-07-10 23:41:29 +00:00
|
|
|
SET( WITHLIRC 1 )
|
2011-02-24 11:14:59 +00:00
|
|
|
ELSE( ENABLE_LIRC )
|
2008-08-03 21:02:37 +00:00
|
|
|
SET( WITHLIRC 0 )
|
2011-02-24 11:14:59 +00:00
|
|
|
ENDIF( ENABLE_LIRC )
|
2008-06-06 10:17:20 +00:00
|
|
|
|
|
|
|
# Set the default install dir
|
|
|
|
IF( NOT DATA_INSTALL_DIR )
|
|
|
|
SET( DATA_INSTALL_DIR "share/vbam" )
|
|
|
|
ENDIF( NOT DATA_INSTALL_DIR )
|
|
|
|
|
|
|
|
SET( PKGDATADIR ${CMAKE_INSTALL_PREFIX}/${DATA_INSTALL_DIR} )
|
|
|
|
|
|
|
|
# Set the configuration file location
|
|
|
|
IF( NOT SYSCONFDIR )
|
|
|
|
SET( SYSCONFDIR "/etc" )
|
|
|
|
ENDIF( NOT SYSCONFDIR )
|
|
|
|
|
|
|
|
# C defines
|
2008-07-10 23:41:29 +00:00
|
|
|
ADD_DEFINITIONS (-DHAVE_NETINET_IN_H -DHAVE_ARPA_INET_H -DHAVE_ZLIB_H -DFINAL_VERSION -DSDL -DUSE_OPENGL -DSYSCONFDIR='"${SYSCONFDIR}"' -DWITH_LIRC='${WITHLIRC}')
|
2008-06-06 10:17:20 +00:00
|
|
|
ADD_DEFINITIONS (-DVERSION='"${VERSION}"' -DPKGDATADIR='"${PKGDATADIR}"' -DPACKAGE='')
|
|
|
|
|
2011-05-25 11:55:46 +00:00
|
|
|
if( ENABLE_LINK )
|
2012-09-07 19:09:16 +00:00
|
|
|
# IPC linking code needs sem_timedwait which can be either in librt or pthreads
|
2011-05-25 11:55:46 +00:00
|
|
|
FIND_LIBRARY(RT_LIB rt)
|
|
|
|
IF(RT_LIB)
|
2012-09-07 19:09:16 +00:00
|
|
|
SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${RT_LIB})
|
2011-05-25 11:55:46 +00:00
|
|
|
SET(VBAMCORE_LIBS ${VBAMCORE_LIBS} ${RT_LIB})
|
|
|
|
ENDIF(RT_LIB)
|
2015-05-18 02:41:21 +00:00
|
|
|
|
2012-09-07 19:09:16 +00:00
|
|
|
FIND_LIBRARY(PTHREAD_LIB pthread)
|
|
|
|
IF(PTHREAD_LIB)
|
|
|
|
SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${PTHREAD_LIB})
|
|
|
|
SET(VBAMCORE_LIBS ${VBAMCORE_LIBS} ${PTHREAD_LIB})
|
|
|
|
ENDIF(PTHREAD_LIB)
|
2015-05-18 02:41:21 +00:00
|
|
|
|
2011-05-25 11:55:46 +00:00
|
|
|
INCLUDE(CheckFunctionExists)
|
|
|
|
CHECK_FUNCTION_EXISTS(sem_timedwait SEM_TIMEDWAIT)
|
|
|
|
IF( SEM_TIMEDWAIT)
|
|
|
|
ADD_DEFINITIONS (-DHAVE_SEM_TIMEDWAIT)
|
|
|
|
ENDIF( SEM_TIMEDWAIT)
|
|
|
|
else( ENABLE_LINK )
|
2011-02-20 19:03:38 +00:00
|
|
|
ADD_DEFINITIONS (-DNO_LINK)
|
2011-05-25 11:55:46 +00:00
|
|
|
endif( ENABLE_LINK )
|
2011-02-20 12:22:58 +00:00
|
|
|
|
2008-06-16 20:18:49 +00:00
|
|
|
# The debugger is enabled by default
|
2011-02-24 11:14:59 +00:00
|
|
|
if( NOT ENABLE_DEBUGGER )
|
2008-06-16 20:18:49 +00:00
|
|
|
ADD_DEFINITIONS (-DNO_DEBUGGER)
|
2011-02-24 11:14:59 +00:00
|
|
|
else( NOT ENABLE_DEBUGGER )
|
2008-06-16 20:18:49 +00:00
|
|
|
ADD_DEFINITIONS (-DBKPT_SUPPORT)
|
2011-02-24 11:14:59 +00:00
|
|
|
endif( NOT ENABLE_DEBUGGER )
|
2008-06-16 20:18:49 +00:00
|
|
|
|
2008-06-06 10:17:20 +00:00
|
|
|
# The ASM core is disabled by default because we don't know on which platform we are
|
2011-02-24 11:14:59 +00:00
|
|
|
IF( NOT ENABLE_ASM_CORE )
|
2008-06-06 10:17:20 +00:00
|
|
|
ADD_DEFINITIONS (-DC_CORE)
|
2011-02-24 11:14:59 +00:00
|
|
|
ENDIF( NOT ENABLE_ASM_CORE )
|
2008-06-06 10:17:20 +00:00
|
|
|
|
2011-02-24 13:06:17 +00:00
|
|
|
# Enable internationalization
|
|
|
|
if( ENABLE_NLS )
|
2011-02-24 17:01:10 +00:00
|
|
|
SET( LOCALEDIR ${CMAKE_INSTALL_PREFIX}/share/locale )
|
|
|
|
ADD_DEFINITIONS ( -DENABLE_NLS )
|
|
|
|
ADD_DEFINITIONS ( -DLOCALEDIR=\\\"${LOCALEDIR}\\\" )
|
2011-05-25 11:55:46 +00:00
|
|
|
# for now, only GBALink.cpp uses gettext() directly
|
|
|
|
IF(ENABLE_LINK)
|
|
|
|
FIND_PATH(LIBINTL_INC libintl.h )
|
|
|
|
FIND_LIBRARY(LIBINTL_LIB intl )
|
|
|
|
IF(LIBINTL_LIB)
|
|
|
|
SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${LIBINTL_LIB})
|
|
|
|
SET(VBAMCORE_LIBS ${VBAMCORE_LIBS} ${LIBINTL_LIB})
|
|
|
|
ENDIF(LIBINTL_LIB)
|
|
|
|
INCLUDE(CheckFunctionExists)
|
|
|
|
CHECK_FUNCTION_EXISTS(gettext GETTEXT_FN)
|
|
|
|
IF(NOT LIBINTL_INC OR NOT GETTEXT_FN)
|
|
|
|
message( SEND_ERROR "NLS requires libintl" )
|
|
|
|
ENDIF(NOT LIBINTL_INC OR NOT GETTEXT_FN)
|
|
|
|
INCLUDE_DIRECTORIES(${LIBINTL_INC})
|
|
|
|
ENDIF(ENABLE_LINK)
|
2011-02-24 13:06:17 +00:00
|
|
|
endif( ENABLE_NLS )
|
|
|
|
|
2008-06-06 10:17:20 +00:00
|
|
|
# Compiler flags
|
|
|
|
IF ( WIN32 )
|
2011-02-20 13:31:49 +00:00
|
|
|
SET( CMAKE_ASM_NASM_FLAGS "-I$(CMAKE_SOURCE_DIR)/src/filters/hq/asm/ -O1 -w-orphan-labels")
|
2008-06-06 10:17:20 +00:00
|
|
|
ELSE ( WIN32 )
|
2011-02-20 13:31:49 +00:00
|
|
|
SET( CMAKE_ASM_NASM_FLAGS "-I$(CMAKE_SOURCE_DIR)/src/filters/hq/asm/ -O1 -DELF -w-orphan-labels")
|
2008-06-06 10:17:20 +00:00
|
|
|
ENDIF ( WIN32 )
|
2011-02-26 12:11:06 +00:00
|
|
|
|
|
|
|
SET( CMAKE_C_FLAGS_RELEASE "-O3")
|
|
|
|
SET( CMAKE_CXX_FLAGS_RELEASE "-O3")
|
|
|
|
SET( CMAKE_C_FLAGS_DEBUG "-g -Wall")
|
|
|
|
SET( CMAKE_CXX_FLAGS_DEBUG "-g -Wall")
|
2008-06-06 10:17:20 +00:00
|
|
|
|
2015-05-18 03:04:34 +00:00
|
|
|
if (MINGW)
|
2015-05-18 03:05:58 +00:00
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static-libgcc -static -I../dependencies/include")
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -static-libstdc++ -static -I../dependencies/include")
|
2015-05-18 03:04:34 +00:00
|
|
|
endif (MINGW)
|
|
|
|
|
|
|
|
|
2015-03-27 17:48:42 +00:00
|
|
|
add_subdirectory (fex)
|
2010-03-15 03:36:45 +00:00
|
|
|
|
2008-06-06 10:17:20 +00:00
|
|
|
SET(SRC_MAIN
|
|
|
|
src/Util.cpp
|
2015-04-18 06:53:55 +00:00
|
|
|
src/common/ConfigManager.cpp
|
|
|
|
src/common/dictionary.c
|
|
|
|
src/common/iniparser.c
|
2009-01-01 14:21:18 +00:00
|
|
|
src/common/Patch.cpp
|
|
|
|
src/common/memgzio.c
|
2011-05-24 07:49:00 +00:00
|
|
|
src/common/SoundSDL.cpp
|
2008-06-06 10:17:20 +00:00
|
|
|
)
|
|
|
|
|
2011-05-24 07:39:29 +00:00
|
|
|
if(ENABLE_FFMPEG)
|
|
|
|
SET(SRC_MAIN ${SRC_MAIN} src/common/ffmpeg.cpp)
|
|
|
|
endif(ENABLE_FFMPEG)
|
|
|
|
|
2009-01-01 15:20:03 +00:00
|
|
|
SET(SRC_GBA
|
|
|
|
src/gba/agbprint.cpp
|
2009-01-01 16:11:02 +00:00
|
|
|
src/gba/bios.cpp
|
2015-04-02 05:53:57 +00:00
|
|
|
src/gba/BreakpointStructures.cpp
|
2009-01-01 16:11:02 +00:00
|
|
|
src/gba/Cheats.cpp
|
2011-05-24 07:49:00 +00:00
|
|
|
src/gba/CheatSearch.cpp
|
2015-04-02 05:53:57 +00:00
|
|
|
src/gba/debugger-expr-lex.cpp
|
|
|
|
src/gba/debugger-expr-yacc.cpp
|
2009-01-01 16:11:02 +00:00
|
|
|
src/gba/EEprom.cpp
|
2015-03-27 22:50:11 +00:00
|
|
|
src/gba/ereader.cpp
|
2009-01-01 16:11:02 +00:00
|
|
|
src/gba/Flash.cpp
|
2009-01-01 15:20:03 +00:00
|
|
|
src/gba/GBA.cpp
|
|
|
|
src/gba/GBAGfx.cpp
|
2010-03-15 03:36:45 +00:00
|
|
|
src/gba/GBALink.cpp
|
|
|
|
src/gba/GBASockClient.cpp
|
2009-01-01 15:20:03 +00:00
|
|
|
src/gba/GBA-thumb.cpp
|
|
|
|
src/gba/GBA-arm.cpp
|
2009-10-09 14:47:41 +00:00
|
|
|
src/gba/gbafilter.cpp
|
2009-01-01 16:11:02 +00:00
|
|
|
src/gba/Globals.cpp
|
|
|
|
src/gba/Mode0.cpp
|
|
|
|
src/gba/Mode1.cpp
|
|
|
|
src/gba/Mode2.cpp
|
|
|
|
src/gba/Mode3.cpp
|
|
|
|
src/gba/Mode4.cpp
|
|
|
|
src/gba/Mode5.cpp
|
|
|
|
src/gba/RTC.cpp
|
|
|
|
src/gba/Sound.cpp
|
|
|
|
src/gba/Sram.cpp
|
2008-06-06 10:17:20 +00:00
|
|
|
)
|
|
|
|
|
2009-01-01 14:52:03 +00:00
|
|
|
SET(SRC_GB
|
|
|
|
src/gb/GB.cpp
|
|
|
|
src/gb/gbCheats.cpp
|
|
|
|
src/gb/gbDis.cpp
|
|
|
|
src/gb/gbGfx.cpp
|
|
|
|
src/gb/gbGlobals.cpp
|
|
|
|
src/gb/gbMemory.cpp
|
|
|
|
src/gb/gbPrinter.cpp
|
|
|
|
src/gb/gbSGB.cpp
|
|
|
|
src/gb/gbSound.cpp
|
2009-01-01 14:43:18 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
SET(SRC_APU
|
|
|
|
src/apu/Blip_Buffer.cpp
|
|
|
|
src/apu/Effects_Buffer.cpp
|
|
|
|
src/apu/Gb_Apu.cpp
|
|
|
|
src/apu/Gb_Apu_State.cpp
|
|
|
|
src/apu/Gb_Oscs.cpp
|
|
|
|
src/apu/Multi_Buffer.cpp
|
2008-06-06 10:17:20 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
SET(SRC_SDL
|
|
|
|
src/sdl/SDL.cpp
|
|
|
|
src/sdl/filters.cpp
|
|
|
|
src/sdl/text.cpp
|
2008-08-30 17:50:51 +00:00
|
|
|
src/sdl/inputSDL.cpp
|
2008-08-29 10:23:51 +00:00
|
|
|
src/sdl/expr.cpp
|
|
|
|
src/sdl/exprNode.cpp
|
|
|
|
src/sdl/expr-lex.cpp
|
2008-06-06 10:17:20 +00:00
|
|
|
)
|
|
|
|
|
2009-01-01 13:02:35 +00:00
|
|
|
SET(SRC_FILTERS
|
|
|
|
src/filters/2xSaI.cpp
|
|
|
|
src/filters/admame.cpp
|
|
|
|
src/filters/bilinear.cpp
|
|
|
|
src/filters/hq2x.cpp
|
|
|
|
src/filters/interframe.cpp
|
|
|
|
src/filters/pixel.cpp
|
|
|
|
src/filters/scanline.cpp
|
2011-05-25 11:55:46 +00:00
|
|
|
src/filters/simpleFilter.cpp
|
2015-03-19 01:44:47 +00:00
|
|
|
src/filters/xbrzfilter.cpp
|
|
|
|
src/filters/xBRZ/xbrz.cpp
|
2009-01-01 13:02:35 +00:00
|
|
|
)
|
|
|
|
|
2008-06-06 10:17:20 +00:00
|
|
|
SET(SRC_HQ_C
|
2009-01-01 13:02:35 +00:00
|
|
|
src/filters/hq/c/hq_implementation.cpp
|
2008-06-06 10:17:20 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
SET(SRC_HQ_ASM
|
2009-01-01 13:02:35 +00:00
|
|
|
src/filters/hq/asm/hq3x_16.asm
|
|
|
|
src/filters/hq/asm/hq3x_32.asm
|
|
|
|
src/filters/hq/asm/hq4x_16.asm
|
|
|
|
src/filters/hq/asm/hq4x_32.asm
|
|
|
|
src/filters/hq/asm/hq3x32.cpp
|
2008-06-06 10:17:20 +00:00
|
|
|
)
|
|
|
|
|
2011-05-25 11:55:46 +00:00
|
|
|
if( ENABLE_ASM_SCALERS )
|
|
|
|
SET(SRC_FILTERS ${SRC_FILTERS} ${SRC_HQ_ASM})
|
|
|
|
else( ENABLE_ASM_SCALERS )
|
|
|
|
SET(SRC_FILTERS ${SRC_FILTERS} ${SRC_HQ_C})
|
|
|
|
ADD_DEFINITIONS ( -DNO_ASM )
|
|
|
|
endif( ENABLE_ASM_SCALERS )
|
|
|
|
|
2011-02-24 11:14:59 +00:00
|
|
|
if( ENABLE_DEBUGGER )
|
2008-06-16 20:18:49 +00:00
|
|
|
SET(SRC_DEBUGGER
|
2009-01-01 16:11:02 +00:00
|
|
|
src/gba/armdis.cpp
|
|
|
|
src/gba/elf.cpp
|
|
|
|
src/gba/remote.cpp
|
2008-06-16 20:18:49 +00:00
|
|
|
)
|
2011-02-24 11:14:59 +00:00
|
|
|
endif( ENABLE_DEBUGGER )
|
2008-06-16 20:18:49 +00:00
|
|
|
|
2008-08-03 21:02:37 +00:00
|
|
|
INCLUDE_DIRECTORIES(
|
2008-06-06 16:42:31 +00:00
|
|
|
${ZLIB_INCLUDE_DIR}
|
2010-03-15 03:36:45 +00:00
|
|
|
fex
|
2008-10-20 16:30:07 +00:00
|
|
|
${PNG_INCLUDE_DIR}
|
2008-08-29 19:45:17 +00:00
|
|
|
${SDL_INCLUDE_DIR}
|
2008-06-06 10:17:20 +00:00
|
|
|
)
|
|
|
|
|
2012-05-23 06:19:44 +00:00
|
|
|
IF( ENABLE_FFMPEG )
|
|
|
|
INCLUDE_DIRECTORIES(
|
|
|
|
${FFMPEG_INCLUDE_DIRS}
|
|
|
|
)
|
|
|
|
ENDIF( ENABLE_FFMPEG )
|
|
|
|
|
2008-06-06 10:17:20 +00:00
|
|
|
ADD_LIBRARY (
|
|
|
|
vbamcore
|
2015-05-10 22:54:19 +00:00
|
|
|
STATIC
|
2008-06-06 10:17:20 +00:00
|
|
|
${PROJECT_SRCS}
|
|
|
|
${SRC_MAIN}
|
2009-01-01 15:20:03 +00:00
|
|
|
${SRC_GBA}
|
2009-01-01 14:52:03 +00:00
|
|
|
${SRC_GB}
|
2009-01-01 14:43:18 +00:00
|
|
|
${SRC_APU}
|
2009-01-01 13:02:35 +00:00
|
|
|
${SRC_FILTERS}
|
2008-06-16 20:18:49 +00:00
|
|
|
${SRC_DEBUGGER}
|
2008-06-06 10:17:20 +00:00
|
|
|
)
|
|
|
|
|
2011-02-24 11:14:59 +00:00
|
|
|
IF( ENABLE_SDL )
|
2008-06-06 10:17:20 +00:00
|
|
|
ADD_EXECUTABLE (
|
|
|
|
vbam
|
|
|
|
WIN32
|
|
|
|
${SRC_SDL}
|
|
|
|
)
|
|
|
|
|
2008-06-06 16:42:31 +00:00
|
|
|
IF( WIN32 )
|
|
|
|
SET( WIN32_LIBRARIES wsock32 )
|
|
|
|
ENDIF( WIN32 )
|
|
|
|
|
2011-02-24 11:14:59 +00:00
|
|
|
IF( ENABLE_LIRC )
|
2008-08-03 21:02:37 +00:00
|
|
|
SET( LIRC_CLIENT_LIBRARY lirc_client )
|
2011-02-24 11:14:59 +00:00
|
|
|
ENDIF( ENABLE_LIRC )
|
2008-08-03 21:02:37 +00:00
|
|
|
|
2008-06-06 10:17:20 +00:00
|
|
|
TARGET_LINK_LIBRARIES (
|
|
|
|
vbam
|
2011-05-25 11:55:46 +00:00
|
|
|
${VBAMCORE_LIBS}
|
2008-06-06 16:42:31 +00:00
|
|
|
${WIN32_LIBRARIES}
|
2008-08-03 21:02:37 +00:00
|
|
|
${LIRC_CLIENT_LIBRARY}
|
2008-06-06 10:17:20 +00:00
|
|
|
)
|
2015-03-27 17:48:42 +00:00
|
|
|
IF( WIN32 )
|
|
|
|
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/vbam${CMAKE_EXECUTABLE_SUFFIX} DESTINATION bin)
|
|
|
|
ELSE( WIN32 )
|
|
|
|
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/vbam DESTINATION bin)
|
|
|
|
ENDIF( WIN32 )
|
|
|
|
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/sdl/vbam.cfg-example
|
|
|
|
DESTINATION ${SYSCONFDIR}
|
|
|
|
RENAME vbam.cfg)
|
2011-02-24 11:14:59 +00:00
|
|
|
ENDIF( ENABLE_SDL )
|
2008-06-06 10:17:20 +00:00
|
|
|
|
2011-02-24 11:14:59 +00:00
|
|
|
IF( ENABLE_GTK )
|
2015-03-27 17:48:42 +00:00
|
|
|
add_subdirectory (src/gtk)
|
2011-05-25 11:55:46 +00:00
|
|
|
ENDIF( ENABLE_GTK )
|
|
|
|
|
|
|
|
IF( ENABLE_WX )
|
|
|
|
add_subdirectory(src/wx)
|
|
|
|
ENDIF( ENABLE_WX )
|
|
|
|
|
|
|
|
if( ENABLE_GTK OR ENABLE_WX )
|
2011-02-24 17:46:59 +00:00
|
|
|
# Native Language Support
|
|
|
|
if( ENABLE_NLS )
|
|
|
|
add_subdirectory(po)
|
|
|
|
endif( ENABLE_NLS )
|
2011-05-25 11:55:46 +00:00
|
|
|
endif( ENABLE_GTK OR ENABLE_WX )
|
2015-03-27 17:48:42 +00:00
|
|
|
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/vba-over.ini DESTINATION ${DATA_INSTALL_DIR})
|
|
|
|
IF(NOT APPLE)
|
|
|
|
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src/gtk/icons/ DESTINATION share/icons/hicolor PATTERN ".svn" EXCLUDE)
|
2015-04-05 04:28:40 +00:00
|
|
|
ENDIF(NOT APPLE)
|
2015-05-18 00:28:34 +00:00
|
|
|
|
|
|
|
# manual pages
|
|
|
|
IF( UNIX )
|
|
|
|
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/debian/vbam.1 DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man1)
|
|
|
|
IF( ENABLE_GTK )
|
|
|
|
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/debian/gvbam.1 DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man1)
|
|
|
|
ENDIF( ENABLE_GTK )
|
|
|
|
IF( ENABLE_WX )
|
|
|
|
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/debian/wxvbam.1 DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man1)
|
|
|
|
ENDIF( ENABLE_WX )
|
|
|
|
ENDIF( UNIX )
|
|
|
|
|
2015-04-05 04:28:40 +00:00
|
|
|
SET(CPACK_GENERATOR "ZIP")
|
2015-05-18 02:41:21 +00:00
|
|
|
SET(CPACK_PACKAGE_VERSION_MAJOR "2")
|
|
|
|
SET(CPACK_PACKAGE_VERSION_MINOR "0")
|
|
|
|
SET(CPACK_PACKAGE_VERSION_PATCH "0-SVN")
|
2015-05-18 00:28:34 +00:00
|
|
|
INCLUDE(CPack)
|