CMake: DolphinWX cleanup

This commit is contained in:
Michael Maltese
2017-04-24 14:55:29 -07:00
parent 6e1940c404
commit c214c29b01

View File

@ -1,4 +1,8 @@
set(GUI_SRCS
if(NOT wxWidgets_FOUND)
return()
endif()
set(SRCS
AboutDolphin.cpp
ControllerConfigDiag.cpp
Cheats/ActionReplayCodesPanel.cpp
@ -78,21 +82,19 @@ set(GUI_SRCS
WxUtils.cpp
)
set(WXLIBS wxWidgets::wxWidgets)
set(LIBS
core
uicommon
cpp-optparse
wxWidgets::wxWidgets
)
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
set(WXLIBS ${WXLIBS} dl)
list(APPEND LIBS dl)
endif()
list(APPEND LIBS core uicommon cpp-optparse)
if(APPLE)
if(wxWidgets_FOUND)
list(APPEND WXLIBS
${APPSERV_LIBRARY}
${COCOA_LIBRARY}
)
endif()
# Add resource files to application bundle.
set(RESOURCES resources/Dolphin.icns)
list(APPEND SRCS ${RESOURCES})
@ -115,10 +117,8 @@ endif()
set(DOLPHIN_EXE ${DOLPHIN_EXE_BASE})
if(wxWidgets_FOUND)
add_executable(${DOLPHIN_EXE} ${SRCS} ${GUI_SRCS})
target_link_libraries(${DOLPHIN_EXE} ${LIBS} ${WXLIBS})
add_executable(${DOLPHIN_EXE} ${SRCS})
target_link_libraries(${DOLPHIN_EXE} ${LIBS})
# Handle localization
find_package(Gettext)
@ -191,4 +191,3 @@ if(wxWidgets_FOUND)
endif()
set(CPACK_PACKAGE_EXECUTABLES ${CPACK_PACKAGE_EXECUTABLES} ${DOLPHIN_EXE})
endif()