DolphinWX/CMakeLists: Remove usages of the LIBS and SRCS variables

Instead, operated on the target itself.
This commit is contained in:
Lioncash
2018-04-02 12:21:59 -04:00
parent 4331f80489
commit 516b46845d

View File

@ -2,7 +2,7 @@ if(NOT wxWidgets_FOUND)
return() return()
endif() endif()
set(SRCS add_executable(dolphin-emu
AboutDolphin.cpp AboutDolphin.cpp
ControllerConfigDiag.cpp ControllerConfigDiag.cpp
Cheats/ActionReplayCodesPanel.cpp Cheats/ActionReplayCodesPanel.cpp
@ -83,7 +83,8 @@ set(SRCS
WxUtils.cpp WxUtils.cpp
) )
set(LIBS target_link_libraries(dolphin-emu
PRIVATE
core core
uicommon uicommon
cpp-optparse cpp-optparse
@ -93,21 +94,18 @@ set(LIBS
if(APPLE) if(APPLE)
# Add resource files to application bundle. # Add resource files to application bundle.
set(RESOURCES "${CMAKE_SOURCE_DIR}/Data/Dolphin.icns") set(RESOURCES "${CMAKE_SOURCE_DIR}/Data/Dolphin.icns")
list(APPEND SRCS ${RESOURCES}) target_sources(dolphin-emu PRIVATE ${RESOURCES})
set_source_files_properties(${RESOURCES} PROPERTIES set_source_files_properties(${RESOURCES} PROPERTIES
MACOSX_PACKAGE_LOCATION Resources) MACOSX_PACKAGE_LOCATION Resources)
endif() endif()
if(WIN32) if(WIN32)
list(APPEND SRCS target_sources(dolphin-emu PRIVATE
DolphinWX.manifest DolphinWX.manifest
DolphinWX.rc DolphinWX.rc
) )
endif() endif()
add_executable(dolphin-emu ${SRCS})
target_link_libraries(dolphin-emu PRIVATE ${LIBS})
if(USE_X11) if(USE_X11)
find_package(GTK2 REQUIRED) find_package(GTK2 REQUIRED)
target_link_libraries(dolphin-emu PRIVATE ${GTK2_LIBRARIES}) target_link_libraries(dolphin-emu PRIVATE ${GTK2_LIBRARIES})