From 6f694e435c415b06bb5e042541ab28ffb1d46317 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 4 Apr 2018 11:41:50 -0400 Subject: [PATCH 1/2] DolphinNoGUI/CMakeLists: Remove the use of SRCS and LIBS variables Instead, operate on the target directly. This removes the last usages of the SRCS and LIBS variables. --- Source/Core/DolphinNoGUI/CMakeLists.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Source/Core/DolphinNoGUI/CMakeLists.txt b/Source/Core/DolphinNoGUI/CMakeLists.txt index 9a0b19a616..9dbbe040e1 100644 --- a/Source/Core/DolphinNoGUI/CMakeLists.txt +++ b/Source/Core/DolphinNoGUI/CMakeLists.txt @@ -2,16 +2,17 @@ if(NOT(USE_X11 OR ENABLE_HEADLESS)) return() endif() -set(NOGUI_SRCS MainNoGUI.cpp) +add_executable(dolphin-nogui + MainNoGUI.cpp +) -add_executable(dolphin-nogui ${NOGUI_SRCS}) set_target_properties(dolphin-nogui PROPERTIES OUTPUT_NAME dolphin-emu-nogui) -target_link_libraries(dolphin-nogui PRIVATE +target_link_libraries(dolphin-nogui +PRIVATE core uicommon cpp-optparse - ${LIBS} ) set(CPACK_PACKAGE_EXECUTABLES ${CPACK_PACKAGE_EXECUTABLES} dolphin-nogui) From 84ed6fd445116606a8438acc72a75a97484a1273 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 4 Apr 2018 11:46:27 -0400 Subject: [PATCH 2/2] CMakeLists: Remove the LIBS variable Now that we link all libraries in explicitly, the top-level LIBS variable can finally go. --- CMakeLists.txt | 5 ----- 1 file changed, 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4c2600de65..e93b98140e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -80,9 +80,6 @@ include(DolphinCompileDefinitions) # Enable folders for IDE set_property(GLOBAL PROPERTY USE_FOLDERS ON) -# Libraries to link -set(LIBS) - # Set up paths set(bindir ${CMAKE_INSTALL_PREFIX}/bin CACHE PATH "bindir") if(HAIKU) @@ -386,8 +383,6 @@ elseif(HAIKU) set(USE_X11 0) set(USE_UPNP 0) set(USE_EGL 0) -elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") - list(APPEND LIBS rt) endif() if(ENABLE_HEADLESS)