From 3854e2bcca270c416e61dc71a88c3e32ae938fde Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 2 Apr 2018 08:15:18 -0400 Subject: [PATCH 1/6] D3D/CMakeLists: Migrate off add_dolphin_library Continues the migration work started in 3a4c3bbe01e7a44ec997f4fbf0b678fba6f2d46c --- Source/Core/VideoBackends/D3D/CMakeLists.txt | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Source/Core/VideoBackends/D3D/CMakeLists.txt b/Source/Core/VideoBackends/D3D/CMakeLists.txt index 1e3af890fb..88f8d67e30 100644 --- a/Source/Core/VideoBackends/D3D/CMakeLists.txt +++ b/Source/Core/VideoBackends/D3D/CMakeLists.txt @@ -1,4 +1,4 @@ -set(SRCS +add_library(videod3d BoundingBox.cpp BoundingBox.h D3DBase.cpp @@ -42,10 +42,11 @@ set(SRCS VideoBackend.h ) -set(LIBS - videocommon - SOIL +target_link_libraries(videod3d +PUBLIC common -) + videocommon -add_dolphin_library(videod3d "${SRCS}" "${LIBS}") +PRIVATE + SOIL +) From d4f8502ad13a6ae643fcc740c72baa07676503e2 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 2 Apr 2018 08:16:59 -0400 Subject: [PATCH 2/6] Null/CMakeLists: Migrate off add_dolphin_library Continues the migration work started in 3a4c3bbe01e7a44ec997f4fbf0b678fba6f2d46c --- Source/Core/VideoBackends/Null/CMakeLists.txt | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Source/Core/VideoBackends/Null/CMakeLists.txt b/Source/Core/VideoBackends/Null/CMakeLists.txt index b89acd85e8..d77c9ef96d 100644 --- a/Source/Core/VideoBackends/Null/CMakeLists.txt +++ b/Source/Core/VideoBackends/Null/CMakeLists.txt @@ -1,14 +1,12 @@ -set(SRCS +add_library(videonull NullBackend.cpp NullTexture.cpp Render.cpp VertexManager.cpp ) -set(LIBS - videocommon +target_link_libraries(videonull +PUBLIC common + videocommon ) - -add_dolphin_library(videonull "${SRCS}" "${LIBS}") - From a3c53ff7546e4cffa057aaae246a8ea1c3d8107e Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 2 Apr 2018 08:22:37 -0400 Subject: [PATCH 3/6] OGL/CMakeLists: Migrate off add_dolphin_library Continues the migration work started in 3a4c3bbe01e7a44ec997f4fbf0b678fba6f2d46c --- Source/Core/VideoBackends/OGL/CMakeLists.txt | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Source/Core/VideoBackends/OGL/CMakeLists.txt b/Source/Core/VideoBackends/OGL/CMakeLists.txt index 5ecc1a4fb2..70aa29cef4 100644 --- a/Source/Core/VideoBackends/OGL/CMakeLists.txt +++ b/Source/Core/VideoBackends/OGL/CMakeLists.txt @@ -1,4 +1,4 @@ -set(SRCS +add_library(videoogl BoundingBox.cpp FramebufferManager.cpp main.cpp @@ -18,11 +18,12 @@ set(SRCS VertexManager.cpp ) -set(LIBS ${LIBS} - videocommon - SOIL +target_link_libraries(videoogl +PUBLIC common + videocommon + +PRIVATE + SOIL ${X11_LIBRARIES} ) - -add_dolphin_library(videoogl "${SRCS}" "${LIBS}") From 8b43a3185539f9de88f0151d3f53251304978afc Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 2 Apr 2018 08:24:39 -0400 Subject: [PATCH 4/6] Software/CMakeLists: Migrate off add_dolphin_library Continues the migration work started in 3a4c3bbe01e7a44ec997f4fbf0b678fba6f2d46c --- Source/Core/VideoBackends/Software/CMakeLists.txt | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Source/Core/VideoBackends/Software/CMakeLists.txt b/Source/Core/VideoBackends/Software/CMakeLists.txt index effa29cec8..cef19f5fb8 100644 --- a/Source/Core/VideoBackends/Software/CMakeLists.txt +++ b/Source/Core/VideoBackends/Software/CMakeLists.txt @@ -1,4 +1,4 @@ -set(SRCS +add_library(videosoftware Clipper.cpp DebugUtil.cpp EfbCopy.cpp @@ -16,11 +16,12 @@ set(SRCS TransformUnit.cpp ) -set(LIBS - videocommon - SOIL +target_link_libraries(videosoftware +PUBLIC common + videocommon + +PRIVATE + SOIL ${X11_LIBRARIES} ) - -add_dolphin_library(videosoftware "${SRCS}" "${LIBS}") From b184923540095b07589ae300ea456f2815e2b24b Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 2 Apr 2018 08:26:15 -0400 Subject: [PATCH 5/6] Vulkan/CMakeLists: Migrate off add_dolphin_library Finishes the migration work started in 3a4c3bbe01e7a44ec997f4fbf0b678fba6f2d46c --- .../Core/VideoBackends/Vulkan/CMakeLists.txt | 33 ++++++++++--------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/Source/Core/VideoBackends/Vulkan/CMakeLists.txt b/Source/Core/VideoBackends/Vulkan/CMakeLists.txt index 4e24d82add..889da03f6f 100644 --- a/Source/Core/VideoBackends/Vulkan/CMakeLists.txt +++ b/Source/Core/VideoBackends/Vulkan/CMakeLists.txt @@ -1,4 +1,4 @@ -set(SRCS +add_library(videovulkan BoundingBox.cpp CommandBufferManager.cpp FramebufferManager.cpp @@ -27,23 +27,26 @@ set(SRCS main.cpp ) -set(LIBS - videocommon - common -) - -# Only include the Vulkan headers when building the Vulkan backend -include_directories(${CMAKE_SOURCE_DIR}/Externals/Vulkan/Include) - -# Silence warnings on glslang by flagging it as a system include -include_directories(SYSTEM ${CMAKE_SOURCE_DIR}/Externals/glslang/glslang/Public) -include_directories(SYSTEM ${CMAKE_SOURCE_DIR}/Externals/glslang/SPIRV) - -# Link against glslang, the other necessary libraries are referenced by the executable. -add_dolphin_library(videovulkan "${SRCS}" "${LIBS}") target_link_libraries(videovulkan +PUBLIC + common + videocommon + PRIVATE + # Link against glslang, the other necessary libraries are referenced by the executable. glslang xxhash ) +# Only include the Vulkan headers when building the Vulkan backend +target_include_directories(videovulkan +PRIVATE + ${CMAKE_SOURCE_DIR}/Externals/Vulkan/Include +) + +# Silence warnings on glslang by flagging it as a system include +target_include_directories(videovulkan +SYSTEM PRIVATE + ${CMAKE_SOURCE_DIR}/Externals/glslang/glslang/Public + ${CMAKE_SOURCE_DIR}/Externals/glslang/SPIRV +) From 22be923b91654b7b5b0fd0ed60183b90c4d1d660 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 2 Apr 2018 08:31:55 -0400 Subject: [PATCH 6/6] CMakeLists: Remove add_dolphin_library macro With all library targets migrated off add_dolphin_library, we can finally remove it --- Source/CMakeLists.txt | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index a16b31cb20..652b5f5422 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -35,12 +35,6 @@ endif() add_definitions(-D__STDC_LIMIT_MACROS) add_definitions(-D__STDC_CONSTANT_MACROS) -# DEPRECATED: When introducing new libraries, do it explicitly. -macro(add_dolphin_library lib srcs libs) - add_library(${lib} STATIC ${srcs}) - target_link_libraries(${lib} PUBLIC ${libs}) -endmacro() - add_subdirectory(Core) if (ANDROID) add_subdirectory(Android/jni)