Merge branch 'cmake-osx2'

This commit is contained in:
Maarten ter Huurne 2011-12-17 16:30:02 +01:00
commit ed1bfdf293
12 changed files with 1602 additions and 82 deletions

View File

@ -7,11 +7,17 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/CMakeTests)
set(DOLPHIN_IS_STABLE FALSE)
# Set up paths
set(bindir ${CMAKE_INSTALL_PREFIX}/bin CACHE PATH "bindir")
set(datadir ${CMAKE_INSTALL_PREFIX}/share/dolphin-emu CACHE PATH "datadir")
if((${CMAKE_SYSTEM_NAME} MATCHES "Darwin"))
# The gettext module will install the translations unconditionally.
# Redirect the installation to a build directory where it does no harm.
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install-dummy)
else()
set(bindir ${CMAKE_INSTALL_PREFIX}/bin CACHE PATH "bindir")
set(datadir ${CMAKE_INSTALL_PREFIX}/share/dolphin-emu CACHE PATH "datadir")
add_definitions(-DDATA_DIR="${datadir}/")
endif()
set(userdir ".dolphin-emu" CACHE STRING "User directory")
add_definitions(-DUSER_DIR="${userdir}")
add_definitions(-DDATA_DIR="${datadir}/")
# Set where the binary files will be built. The program will not execute from
# here. You must run "make install" to install these to the proper location
@ -67,6 +73,15 @@ if(GIT_FOUND AND NOT DOLPHIN_WC_REVISION)
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
# version number
set(DOLPHIN_VERSION_MAJOR "3")
set(DOLPHIN_VERSION_MINOR "0")
if(DOLPHIN_IS_STABLE)
set(DOLPHIN_VERSION_PATCH "0")
else()
set(DOLPHIN_VERSION_PATCH ${DOLPHIN_WC_REVISION})
endif()
# Various compile flags
add_definitions(-msse2)
@ -100,25 +115,63 @@ if(UNIX AND NOT APPLE)
endif()
if (APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -x objective-c++")
# Ignore MacPorts and Fink and any other locally installed packages that
# might prevent building a distributable binary.
set(CMAKE_SYSTEM_PREFIX_PATH /usr)
# Some of our code contains Objective C constructs.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -x objective-c")
FIND_LIBRARY(ATB_LIBRARY AudioToolbox)
FIND_LIBRARY(AU_LIBRARY AudioUnit)
FIND_LIBRARY(CARBON_LIBRARY Carbon)
FIND_LIBRARY(COCOA_LIBRARY Cocoa)
FIND_LIBRARY(COREAUDIO_LIBRARY CoreAudio)
FIND_LIBRARY(COREFUND_LIBRARY CoreFoundation)
FIND_LIBRARY(CORESERV_LIBRARY CoreServices)
FIND_LIBRARY(IOB_LIBRARY IOBluetooth)
FIND_LIBRARY(IOK_LIBRARY IOKit)
FIND_LIBRARY(OGL_LIBRARY OpenGL)
FIND_LIBRARY(WEBKIT_LIBRARY WebKit)
SET(EXTRA_LIBS ${ATB_LIBRARY} ${AU_LIBRARY} ${CARBON_LIBRARY}
${COCOA_LIBRARY} ${COREAUDIO_LIBRARY} ${COREFUND_LIBRARY}
${CORESERV_LIBRARY} ${IOB_LIBRARY} ${IOK_LIBRARY} ${OGL_LIBRARY}
${WEBKIT_LIBRARY})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -x objective-c++")
# Avoid mistaking an object file for a source file on the link command line.
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -x none")
# Identify the target system:
# Ask for 32/64-bit fat binary.
set(TARGET_FLAGS "-arch x86_64 -arch i386")
# Minimum OS X version.
# This is inserted into the Info.plist as well.
# Note that the SDK determines the maximum version of which optional
# features can be used, not the minimum required version to run.
set(OSX_MIN_VERSION "10.5.4")
set(TARGET_FLAGS "${TARGET_FLAGS} -mmacosx-version-min=${OSX_MIN_VERSION}")
set(TARGET_FLAGS "${TARGET_FLAGS} -isysroot /Developer/SDKs/MacOSX10.6.sdk")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-syslibroot,/Developer/SDKs/MacOSX10.6.sdk")
# Do not warn about frameworks that are not available on all architectures.
# This avoids a warning when linking with QuickTime.
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-no_arch_warnings")
# Specify target CPUs.
set(TARGET_FLAGS "${TARGET_FLAGS} -Xarch_i386 -msse3")
set(TARGET_FLAGS "${TARGET_FLAGS} -Xarch_i386 -march=prescott")
set(TARGET_FLAGS "${TARGET_FLAGS} -Xarch_x86_64 -mssse3")
set(TARGET_FLAGS "${TARGET_FLAGS} -Xarch_x86_64 -march=core2")
# Target flags apply to both C and C++ compilation.
# CMake passes these to the compiler on the link command line as well.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${TARGET_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TARGET_FLAGS}")
# Linker flags.
# Drop unreachable code and data.
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-dead_strip,-dead_strip_dylibs")
# Reserve the minimum size for the zero page.
# Our JIT requires virtual memory space below 2GB, while the default zero
# page on x86_64 is 4GB in size.
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-pagezero_size,0x1000")
find_library(APPKIT_LIBRARY AppKit)
find_library(APPSERV_LIBRARY ApplicationServices)
find_library(ATB_LIBRARY AudioToolbox)
find_library(AU_LIBRARY AudioUnit)
find_library(CARBON_LIBRARY Carbon)
find_library(COCOA_LIBRARY Cocoa)
find_library(COREAUDIO_LIBRARY CoreAudio)
find_library(COREFUND_LIBRARY CoreFoundation)
find_library(CORESERV_LIBRARY CoreServices)
find_library(IOB_LIBRARY IOBluetooth)
find_library(IOK_LIBRARY IOKit)
find_library(QUICKTIME_LIBRARY QuickTime)
find_library(WEBKIT_LIBRARY WebKit)
endif()
if(WIN32)
add_definitions(-D_SECURE_SCL=0)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
@ -310,6 +363,7 @@ else()
message("Shared lzo not found, falling back to the static library")
add_subdirectory(Externals/LZO)
include_directories(Externals/LZO)
set(LZO lzo2)
endif()
include(FindSDL OPTIONAL)
@ -371,10 +425,17 @@ else()
endif(NOT GLEW_FOUND)
check_lib(CG Cg Cg/cg.h)
if(NOT CG_FOUND)
message("Shared Cg not found, falling back to the static library")
include_directories(Externals)
endif(NOT CG_FOUND)
check_lib(CGGL CgGL Cg/cgGL.h)
endif()
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
find_library(CL OpenCL)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-weak_framework,OpenCL")
else()
include_directories(Externals/CLRun/include)
add_subdirectory(Externals/CLRun)
endif()
@ -384,6 +445,21 @@ if(NOT DISABLE_WX)
include(FindwxWidgets OPTIONAL)
FIND_PACKAGE(wxWidgets COMPONENTS core aui adv)
if(wxWidgets_FOUND)
EXECUTE_PROCESS(
COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}"
${wxWidgets_CONFIG_OPTIONS} --version
OUTPUT_VARIABLE wxWidgets_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET
)
message("Found wxWidgets version ${wxWidgets_VERSION}")
if(${wxWidgets_VERSION} VERSION_LESS "2.8.9")
message("At least 2.8.9 is required; ignoring found version")
unset(wxWidgets_FOUND)
endif()
endif(wxWidgets_FOUND)
if(wxWidgets_FOUND)
include(${wxWidgets_USE_FILE})
@ -414,8 +490,17 @@ if(NOT DISABLE_WX)
message(FATAL_ERROR "wxWidgets not found. It is required to build the GUI")
endif()
message("Shared wxWidgets not found, falling back to the static library")
include_directories(Externals/wxWidgets/include)
add_subdirectory(Externals/wxWidgets)
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
add_definitions(-D__WXOSX_COCOA__)
include_directories(Externals/wxWidgets3)
include_directories(Externals/wxWidgets3/include)
add_subdirectory(Externals/wxWidgets3)
set(wxWidgets_LIBRARIES "wx")
else()
include_directories(Externals/wxWidgets/include)
add_subdirectory(Externals/wxWidgets)
endif()
set(wxWidgets_FOUND TRUE)
endif(wxWidgets_FOUND)
add_definitions(-DHAVE_WX=1)
endif(NOT DISABLE_WX)
@ -456,28 +541,25 @@ add_subdirectory(Source)
########################################
# Install shared data files
#
install(DIRECTORY Data/User/ DESTINATION ${datadir}/user PATTERN .svn EXCLUDE)
install(DIRECTORY Data/Sys/ DESTINATION ${datadir}/sys PATTERN .svn EXCLUDE)
if((NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin"))
install(DIRECTORY Data/User/ DESTINATION ${datadir}/user PATTERN)
install(DIRECTORY Data/Sys/ DESTINATION ${datadir}/sys PATTERN)
endif()
include(FindGettext)
if(GETTEXT_FOUND AND NOT DISABLE_WX)
file(GLOB LINGUAS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} Languages/po/*.po)
GETTEXT_CREATE_TRANSLATIONS(Languages/po/dolphin-emu.pot ALL ${LINGUAS})
endif()
if((NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux") AND (NOT ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD"))
if((NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux|FreeBSD|Darwin"))
install(FILES Data/license.txt DESTINATION ${datadir})
endif()
# packaging information
set(CPACK_PACKAGE_NAME "dolphin-emu")
set(CPACK_PACKAGE_VENDOR "Dolphin Team")
set(CPACK_PACKAGE_VERSION_MAJOR "3")
set(CPACK_PACKAGE_VERSION_MINOR "0")
if(DOLPHIN_IS_STABLE)
set(CPACK_PACKAGE_VERSION_PATCH "0")
else()
set(CPACK_PACKAGE_VERSION_PATCH ${DOLPHIN_WC_REVISION})
endif()
set(CPACK_PACKAGE_VERSION_MAJOR ${DOLPHIN_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${DOLPHIN_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${DOLPHIN_VERSION_PATCH})
# TODO: CPACK_PACKAGE_DESCRIPTION_FILE
# TODO: CPACK_PACKAGE_DESCRIPTION_SUMMARY

19
Externals/libpng/CMakeLists.txt vendored Normal file
View File

@ -0,0 +1,19 @@
set(SRCS
"png.c"
"pngerror.c"
"pngget.c"
"pngmem.c"
"pngpread.c"
"pngread.c"
"pngrio.c"
"pngrtran.c"
"pngrutil.c"
"pngset.c"
"pngtrans.c"
"pngwio.c"
"pngwrite.c"
"pngwtran.c"
"pngwutil.c"
)
add_library(png STATIC ${SRCS})

1260
Externals/wxWidgets3/CMakeLists.txt vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -6,33 +6,33 @@ set(SRCS Src/AudioCommon.cpp
set(LIBS "")
if(ALSA_FOUND)
set(SRCS ${SRCS} Src/AlsaSoundStream.cpp)
set(LIBS ${LIBS} ${ALSA_LIBRARIES})
endif(ALSA_FOUND)
if(AO_FOUND)
set(SRCS ${SRCS} Src/AOSoundStream.cpp)
set(LIBS ${LIBS} ${AO_LIBRARIES})
endif(AO_FOUND)
if(OPENAL_FOUND)
set(SRCS ${SRCS} Src/OpenALStream.cpp Src/aldlist.cpp)
set(LIBS ${LIBS} ${OPENAL_LIBRARY})
endif(OPENAL_FOUND)
if(PULSEAUDIO_FOUND)
set(SRCS ${SRCS} Src/PulseAudioStream.cpp)
set(LIBS ${LIBS} ${PULSEAUDIO_LIBRARIES})
endif(PULSEAUDIO_FOUND)
if(WIN32)
set(SRCS ${SRCS} Src/DSoundStream.cpp)
set(SRCS ${SRCS} Src/XAudio2Stream.cpp)
endif(WIN32)
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(SRCS ${SRCS} Src/CoreAudioSoundStream.cpp)
else()
if(ALSA_FOUND)
set(SRCS ${SRCS} Src/AlsaSoundStream.cpp)
set(LIBS ${LIBS} ${ALSA_LIBRARIES})
endif(ALSA_FOUND)
if(AO_FOUND)
set(SRCS ${SRCS} Src/AOSoundStream.cpp)
set(LIBS ${LIBS} ${AO_LIBRARIES})
endif(AO_FOUND)
if(OPENAL_FOUND)
set(SRCS ${SRCS} Src/OpenALStream.cpp Src/aldlist.cpp)
set(LIBS ${LIBS} openal)
endif(OPENAL_FOUND)
if(PULSEAUDIO_FOUND)
set(SRCS ${SRCS} Src/PulseAudioStream.cpp)
set(LIBS ${LIBS} ${PULSEAUDIO_LIBRARIES})
endif(PULSEAUDIO_FOUND)
if(WIN32)
set(SRCS ${SRCS} Src/DSoundStream.cpp)
set(SRCS ${SRCS} Src/XAudio2Stream.cpp)
endif(WIN32)
endif()
add_library(audiocommon STATIC ${SRCS})

View File

@ -27,6 +27,9 @@
#ifdef _WIN32
#include "../../../../Externals/OpenAL/include/al.h"
#include "../../../../Externals/OpenAL/include/alc.h"
#elif defined(__APPLE__)
#include <al.h>
#include <alc.h>
#else
#include <AL/al.h>
#include <AL/alc.h>

View File

@ -43,29 +43,27 @@ static inline void do_cpuid(unsigned int *eax, unsigned int *ebx,
// Note: EBX is reserved on Mac OS X and in PIC on Linux, so it has to
// restored at the end of the asm block.
__asm__ (
"mov %%rbx,%%rdi;"
"pushq %%rbx;"
"cpuid;"
"movl %%ebx,%1;"
"mov %%rdi,%%rbx;"
"popq %%rbx;"
: "=a" (*eax),
"=g" (*ebx),
"=S" (*ebx),
"=c" (*ecx),
"=d" (*edx)
: "a" (*eax)
: "rdi", "rbx"
);
#else
__asm__(
"movl %%ebx,%%edi;"
__asm__ (
"pushl %%ebx;"
"cpuid;"
"movl %%ebx,%1;"
"movl %%edi,%%ebx;"
"movl %%ebx,%1;"
"popl %%ebx;"
: "=a" (*eax),
"=g" (*ebx),
"=S" (*ebx),
"=c" (*ecx),
"=d" (*edx)
: "a" (*eax)
: "edi", "ebx"
);
#endif
}

View File

@ -1,5 +1,5 @@
set(LIBS core
lzo2
${LZO}
discio
bdisasm
inputcommon
@ -8,7 +8,7 @@ set(LIBS core
z
sfml-network
SDL
GL
${OPENGL_LIBRARIES}
${XRANDR_LIBRARIES}
${X11_LIBRARIES})
@ -71,10 +71,28 @@ endif()
if(WIN32)
set(SRCS ${SRCS} Src/stdafx.cpp)
elseif((${CMAKE_SYSTEM_NAME} MATCHES "Darwin") AND NOT wxWidgets_FOUND)
# TODO
elseif((${CMAKE_SYSTEM_NAME} MATCHES "Darwin") AND wxWidgets_FOUND)
# TODO
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
# Link against OS X system frameworks.
list(APPEND LIBS
${APPKIT_LIBRARY}
${AU_LIBRARY}
${COREAUDIO_LIBRARY}
${COREFUND_LIBRARY}
${CORESERV_LIBRARY}
${IOB_LIBRARY}
${IOK_LIBRARY}
)
if(wxWidgets_FOUND)
list(APPEND LIBS
${APPSERV_LIBRARY}
${COCOA_LIBRARY}
)
endif()
# Add resource files to application bundle.
set(RESOURCES resources/Dolphin.icns)
list(APPEND SRCS ${RESOURCES})
set_source_files_properties(${RESOURCES} PROPERTIES
MACOSX_PACKAGE_LOCATION Resources)
else()
set(SRCS ${SRCS} Src/X11Utils.cpp)
endif()
@ -84,13 +102,83 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR
set(LIBS ${LIBS} usbhid)
endif()
if(wxWidgets_FOUND)
set(DOLPHIN_EXE dolphin-emu)
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(DOLPHIN_EXE_BASE Dolphin)
else()
set(DOLPHIN_EXE dolphin-emu-nogui)
set(DOLPHIN_EXE_BASE dolphin-emu)
endif()
if(wxWidgets_FOUND)
set(DOLPHIN_EXE ${DOLPHIN_EXE_BASE})
else()
set(DOLPHIN_EXE ${DOLPHIN_EXE_BASE}-nogui)
endif()
add_executable(${DOLPHIN_EXE} ${SRCS})
target_link_libraries(${DOLPHIN_EXE} ${LIBS} ${WXLIBS})
install(TARGETS ${DOLPHIN_EXE} RUNTIME DESTINATION ${bindir})
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
include(BundleUtilities)
set(BUNDLE_PATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${DOLPHIN_EXE}.app)
# Ask for an application bundle.
set_target_properties(${DOLPHIN_EXE} PROPERTIES
MACOSX_BUNDLE true
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in
)
# Install Cg framework into application bundle.
copy_resolved_framework_into_bundle(
# Our framework in "Externals" does not have "Versions/Current/" in
# its path; work around the missing directory levels using "././".
"${CMAKE_SOURCE_DIR}/Externals/Cg/Cg.framework/././Cg"
"${BUNDLE_PATH}/Contents/Frameworks/Cg.framework/././Cg"
)
# Fix up the bundle after it is finished.
# There does not seem to be an easy way to run CMake commands post-build,
# so we invoke CMake again on a generated script.
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/postprocess_bundle.cmake "
include(BundleUtilities)
message(\"Fixing up application bundle: ${BUNDLE_PATH}\")
fixup_bundle(\"${BUNDLE_PATH}\" \"\" \"\")
")
add_custom_command(TARGET ${DOLPHIN_EXE} POST_BUILD
COMMAND ${CMAKE_COMMAND} -P postprocess_bundle.cmake
)
# Copy data files into application bundle.
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/copy_data_into_bundle.cmake "
file(INSTALL ${CMAKE_SOURCE_DIR}/Data/Sys ${CMAKE_SOURCE_DIR}/Data/User
DESTINATION ${BUNDLE_PATH}/Contents/Resources
)
file(GLOB TRANSLATION_FILES RELATIVE ${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}/*.gmo
)
foreach(TRANSLATION_FILE \${TRANSLATION_FILES})
string(REPLACE \".gmo\" \".lproj\" TRANSLATION_DIR
\${TRANSLATION_FILE}
)
# It would be better to copy to the new name as a single action,
# but I can't figure out a way to let CMake do that.
file(COPY ${CMAKE_BINARY_DIR}/\${TRANSLATION_FILE}
DESTINATION ${BUNDLE_PATH}/Contents/Resources/\${TRANSLATION_DIR}
NO_SOURCE_PERMISSIONS
)
file(RENAME
${BUNDLE_PATH}/Contents/Resources/\${TRANSLATION_DIR}/\${TRANSLATION_FILE}
${BUNDLE_PATH}/Contents/Resources/\${TRANSLATION_DIR}/dolphin-emu.mo
)
endforeach(TRANSLATION_FILE)
")
add_custom_target(CopyDataIntoBundle ALL
COMMAND ${CMAKE_COMMAND} -P copy_data_into_bundle.cmake
VERBATIM
)
# Install bundle into systemwide /Applications directory.
install(DIRECTORY ${BUNDLE_PATH} DESTINATION /Applications
USE_SOURCE_PERMISSIONS
)
else()
install(TARGETS ${DOLPHIN_EXE} RUNTIME DESTINATION ${bindir})
endif()

View File

@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>ciso</string>
<string>dol</string>
<string>elf</string>
<string>gcm</string>
<string>gcz</string>
<string>iso</string>
<string>wad</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>Dolphin.icns</string>
<key>CFBundleTypeName</key>
<string>Nintendo GC/Wii file</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
</array>
<key>CFBundleExecutable</key>
<string>Dolphin</string>
<key>CFBundleIconFile</key>
<string>Dolphin.icns</string>
<key>CFBundleIdentifier</key>
<string>com.dolphin-emulator.dolphin</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleLocalizations</key>
<array>
<string>ar</string>
<string>el</string>
<string>en</string>
<string>es</string>
<string>fr</string>
<string>hu</string>
<string>pt</string>
<string>pt_BR</string>
<string>tr</string>
</array>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>${DOLPHIN_WC_DESCRIBE}</string>
<key>CFBundleLongVersionString</key>
<string>${DOLPHIN_WC_REVISION}</string>
<key>CFBundleVersion</key>
<string>${DOLPHIN_VERSION_MAJOR}.${DOLPHIN_VERSION_MINOR}</string>
<key>NSHumanReadableCopyright</key>
<string>Licensed under GPL version 2</string>
<key>LSMinimumSystemVersion</key>
<string>${OSX_MIN_VERSION}</string>
<key>LSRequiresCarbon</key>
<true/>
<key>CSResourcesFileMapped</key>
<true/>
</dict>
</plist>

View File

@ -40,6 +40,10 @@ set(SRCS Src/BPFunctions.cpp
Src/memcpy_amd.cpp)
set(LIBS core)
if(NOT ${CL} STREQUAL CL-NOTFOUND)
list(APPEND LIBS ${CL})
endif()
if(wxWidgets_FOUND AND WIN32)
set(SRCS ${SRCS} Src/EmuWindow.cpp)
endif()

View File

@ -1,3 +1,5 @@
add_executable(dsptool Src/DSPTool.cpp)
target_link_libraries(dsptool core)
install(TARGETS dsptool RUNTIME DESTINATION ${bindir})
if((NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin"))
install(TARGETS dsptool RUNTIME DESTINATION ${bindir})
endif()

View File

@ -22,8 +22,10 @@ if(wxWidgets_FOUND)
set(LIBS ${LIBS} ${wxWidgets_LIBRARIES})
endif(wxWidgets_FOUND)
if(APPLE OR WIN32 OR ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
if(WIN32 OR ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(LIBS ${LIBS} Cg CgGL)
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
list(APPEND LIBS "${CMAKE_SOURCE_DIR}/Externals/Cg/Cg.framework")
endif()
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")

View File

@ -4,4 +4,3 @@ set(SRCS AudioJitTests.cpp
add_executable(tester ${SRCS})
target_link_libraries(tester core)
install(TARGETS tester RUNTIME DESTINATION ${bindir})