Merge pull request #1576 from comex/osx-qt-build-fixes
OS X Qt build fixes
This commit is contained in:
commit
aa452f4fe8
|
@ -48,6 +48,8 @@ endif()
|
|||
project(dolphin-emu)
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/CMakeTests)
|
||||
set(DOLPHIN_IS_STABLE FALSE)
|
||||
# Libraries to link
|
||||
set(LIBS)
|
||||
|
||||
# Set up paths
|
||||
if((${CMAKE_SYSTEM_NAME} MATCHES "Darwin"))
|
||||
|
@ -411,6 +413,7 @@ if(NOT ANDROID)
|
|||
set(HAS_LLVM 1)
|
||||
|
||||
include_directories(${LLVM_INCLUDE_DIRS})
|
||||
list(APPEND LIBS ${LLVM_LIBRARIES})
|
||||
|
||||
message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
|
||||
endif()
|
||||
|
@ -456,6 +459,10 @@ if(NOT ANDROID)
|
|||
endif()
|
||||
if(ENCODE_FRAMEDUMPS)
|
||||
check_libav()
|
||||
if(LIBAV_FOUND)
|
||||
LIST(APPEND LIBS ${LIBAV_LIBRARIES})
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
set(CMAKE_REQUIRED_LIBRARIES portaudio)
|
||||
|
@ -535,6 +542,7 @@ else()
|
|||
include_directories(Externals/LZO)
|
||||
set(LZO lzo2)
|
||||
endif()
|
||||
list(APPEND LIBS ${LZO})
|
||||
|
||||
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT ANDROID)
|
||||
check_lib(PNG png png.h QUIET)
|
||||
|
@ -619,6 +627,7 @@ if(USE_UPNP)
|
|||
include_directories(Externals/miniupnpc/src)
|
||||
endif()
|
||||
add_definitions(-DUSE_UPNP)
|
||||
list(APPEND LIBS miniupnpc)
|
||||
endif()
|
||||
|
||||
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT ANDROID)
|
||||
|
@ -649,6 +658,12 @@ if (ANDROID)
|
|||
message("Using static iconv from Externals")
|
||||
include_directories(Externals/libiconv-1.14/include)
|
||||
add_subdirectory(Externals/libiconv-1.14)
|
||||
list(APPEND LIBS iconv)
|
||||
else()
|
||||
find_library(ICONV_LIBRARIES NAMES iconv libiconv libiconv-2 c)
|
||||
find_path(ICONV_INCLUDE_DIR NAMES iconv.h)
|
||||
list(APPEND LIBS ${ICONV_LIBRARIES})
|
||||
mark_as_advanced(ICONV_INCLUDE_DIR ICONV_LIBRARIES)
|
||||
endif()
|
||||
|
||||
if(ENABLE_QT)
|
||||
|
@ -695,6 +710,7 @@ if(NOT DISABLE_WX AND NOT ANDROID)
|
|||
include(FindGTK2)
|
||||
if(GTK2_FOUND)
|
||||
include_directories(${GTK2_INCLUDE_DIRS})
|
||||
list(APPEND LIBS ${GTK2_LIBRARIES})
|
||||
else()
|
||||
message(FATAL_ERROR "GTK is required to build the WX UI. Please install the GTK development libraries.")
|
||||
endif()
|
||||
|
@ -733,6 +749,23 @@ if(NOT DISABLE_WX AND NOT ANDROID)
|
|||
add_definitions(-DHAVE_WX=1)
|
||||
endif(NOT DISABLE_WX AND NOT ANDROID)
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR
|
||||
${CMAKE_SYSTEM_NAME} MATCHES "NetBSD")
|
||||
set(LIBS ${LIBS} usbhid)
|
||||
endif()
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
# Link against OS X system frameworks.
|
||||
list(APPEND LIBS
|
||||
${APPKIT_LIBRARY}
|
||||
${AU_LIBRARY}
|
||||
${COREAUDIO_LIBRARY}
|
||||
${COREFUND_LIBRARY}
|
||||
${CORESERV_LIBRARY}
|
||||
${IOK_LIBRARY}
|
||||
${FORCEFEEDBACK}
|
||||
)
|
||||
endif()
|
||||
|
||||
########################################
|
||||
# Pre-build events: Define configuration variables and write SCM info header
|
||||
|
|
|
@ -23,19 +23,9 @@ set(UIS
|
|||
SystemInfo.ui
|
||||
)
|
||||
|
||||
set(LIBS core uicommon)
|
||||
list(APPEND LIBS core uicommon)
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
# Link against OS X system frameworks.
|
||||
list(APPEND LIBS
|
||||
${APPKIT_LIBRARY}
|
||||
${AU_LIBRARY}
|
||||
${COREAUDIO_LIBRARY}
|
||||
${COREFUND_LIBRARY}
|
||||
${CORESERV_LIBRARY}
|
||||
${IOK_LIBRARY}
|
||||
${FORCEFEEDBACK}
|
||||
)
|
||||
set(DOLPHINQT_BINARY DolphinQt)
|
||||
else()
|
||||
set(DOLPHINQT_BINARY dolphin-emu-qt)
|
||||
|
@ -83,7 +73,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
|||
COMMAND ln -nfs ${CMAKE_SOURCE_DIR}/Data/Sys ${BUNDLE_PATH}/Contents/Resources/Sys
|
||||
VERBATIM
|
||||
)
|
||||
add_custom_target(CopyDataIntoBundle ALL
|
||||
add_custom_target(CopyDataIntoBundleQt ALL
|
||||
DEPENDS ${BUNDLE_PATH}/Contents/Resources/Sys
|
||||
)
|
||||
endif()
|
||||
|
|
|
@ -1,18 +1,3 @@
|
|||
set(LIBS core
|
||||
uicommon
|
||||
${LZO}
|
||||
${GTK2_LIBRARIES})
|
||||
|
||||
if(NOT ANDROID)
|
||||
link_directories(${CMAKE_PREFIX_PATH}/lib)
|
||||
else()
|
||||
set(LIBS ${LIBS} png iconv)
|
||||
endif()
|
||||
|
||||
if(LIBAV_FOUND)
|
||||
set(LIBS ${LIBS} ${LIBAV_LIBRARIES})
|
||||
endif()
|
||||
|
||||
set(GUI_SRCS
|
||||
ARCodeAddEdit.cpp
|
||||
AboutDolphin.cpp
|
||||
|
@ -65,24 +50,21 @@ set(GUI_SRCS
|
|||
|
||||
set(WXLIBS ${wxWidgets_LIBRARIES} dl)
|
||||
|
||||
list(APPEND LIBS core uicommon)
|
||||
|
||||
if(ANDROID)
|
||||
list(APPEND LIBS png)
|
||||
endif()
|
||||
|
||||
|
||||
set(ANDROID_SRCS Android/ButtonManager.cpp
|
||||
MainAndroid.cpp)
|
||||
|
||||
set(NOGUI_SRCS MainNoGUI.cpp)
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
# Link against OS X system frameworks.
|
||||
list(APPEND LIBS
|
||||
${APPKIT_LIBRARY}
|
||||
${AU_LIBRARY}
|
||||
${COREAUDIO_LIBRARY}
|
||||
${COREFUND_LIBRARY}
|
||||
${CORESERV_LIBRARY}
|
||||
${IOK_LIBRARY}
|
||||
${FORCEFEEDBACK}
|
||||
)
|
||||
if(wxWidgets_FOUND)
|
||||
list(APPEND LIBS
|
||||
list(APPEND WXLIBS
|
||||
${APPSERV_LIBRARY}
|
||||
${COCOA_LIBRARY}
|
||||
)
|
||||
|
@ -94,11 +76,6 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
|||
MACOSX_PACKAGE_LOCATION Resources)
|
||||
endif()
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR
|
||||
${CMAKE_SYSTEM_NAME} MATCHES "NetBSD")
|
||||
set(LIBS ${LIBS} usbhid)
|
||||
endif()
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
set(DOLPHIN_EXE_BASE Dolphin)
|
||||
else()
|
||||
|
@ -107,10 +84,6 @@ endif()
|
|||
|
||||
set(DOLPHIN_EXE ${DOLPHIN_EXE_BASE})
|
||||
|
||||
if(USE_UPNP)
|
||||
set(LIBS ${LIBS} miniupnpc)
|
||||
endif()
|
||||
|
||||
include(FindGettext)
|
||||
if(GETTEXT_MSGMERGE_EXECUTABLE AND GETTEXT_MSGFMT_EXECUTABLE AND wxWidgets_FOUND)
|
||||
file(GLOB LINGUAS ${CMAKE_SOURCE_DIR}/Languages/po/*.po)
|
||||
|
@ -145,7 +118,7 @@ if(ANDROID)
|
|||
set(CPACK_PACKAGE_EXECUTABLES ${CPACK_PACKAGE_EXECUTABLES} ${DOLPHIN_EXE})
|
||||
elseif(wxWidgets_FOUND)
|
||||
add_executable(${DOLPHIN_EXE} ${SRCS} ${GUI_SRCS})
|
||||
target_link_libraries(${DOLPHIN_EXE} ${LIBS} ${WXLIBS} ${LLVM_LIBRARIES})
|
||||
target_link_libraries(${DOLPHIN_EXE} ${LIBS} ${WXLIBS})
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
include(BundleUtilities)
|
||||
set(BUNDLE_PATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${DOLPHIN_EXE}.app)
|
||||
|
@ -181,7 +154,7 @@ elseif(wxWidgets_FOUND)
|
|||
COMMAND ln -nfs ${CMAKE_SOURCE_DIR}/Data/Sys ${BUNDLE_PATH}/Contents/Resources/Sys
|
||||
VERBATIM
|
||||
)
|
||||
add_custom_target(CopyDataIntoBundle ALL
|
||||
add_custom_target(CopyDataIntoBundleWx ALL
|
||||
DEPENDS ${BUNDLE_PATH}/Contents/Resources/Sys
|
||||
)
|
||||
endif()
|
||||
|
@ -219,7 +192,7 @@ elseif(wxWidgets_FOUND)
|
|||
${CMAKE_SOURCE_DIR}/Data/Sys
|
||||
VERBATIM
|
||||
)
|
||||
add_custom_target(CopyTranslationsIntoBundle ALL
|
||||
add_custom_target(CopyTranslationsIntoBundleWx ALL
|
||||
DEPENDS ${BUNDLE_PATH}/Contents/Resources/en.lproj
|
||||
)
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue