Merge pull request #6586 from lioncash/video-backends

CMakeLists: Migrate video backends off the add_dolphin_library macro and remove said macro
This commit is contained in:
Léo Lam 2018-04-02 17:10:52 +02:00 committed by GitHub
commit 91f3650fa5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 43 additions and 45 deletions

View File

@ -35,12 +35,6 @@ endif()
add_definitions(-D__STDC_LIMIT_MACROS) add_definitions(-D__STDC_LIMIT_MACROS)
add_definitions(-D__STDC_CONSTANT_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) add_subdirectory(Core)
if (ANDROID) if (ANDROID)
add_subdirectory(Android/jni) add_subdirectory(Android/jni)

View File

@ -1,4 +1,4 @@
set(SRCS add_library(videod3d
BoundingBox.cpp BoundingBox.cpp
BoundingBox.h BoundingBox.h
D3DBase.cpp D3DBase.cpp
@ -42,10 +42,11 @@ set(SRCS
VideoBackend.h VideoBackend.h
) )
set(LIBS target_link_libraries(videod3d
videocommon PUBLIC
SOIL
common common
) videocommon
add_dolphin_library(videod3d "${SRCS}" "${LIBS}") PRIVATE
SOIL
)

View File

@ -1,14 +1,12 @@
set(SRCS add_library(videonull
NullBackend.cpp NullBackend.cpp
NullTexture.cpp NullTexture.cpp
Render.cpp Render.cpp
VertexManager.cpp VertexManager.cpp
) )
set(LIBS target_link_libraries(videonull
videocommon PUBLIC
common common
videocommon
) )
add_dolphin_library(videonull "${SRCS}" "${LIBS}")

View File

@ -1,4 +1,4 @@
set(SRCS add_library(videoogl
BoundingBox.cpp BoundingBox.cpp
FramebufferManager.cpp FramebufferManager.cpp
main.cpp main.cpp
@ -18,11 +18,12 @@ set(SRCS
VertexManager.cpp VertexManager.cpp
) )
set(LIBS ${LIBS} target_link_libraries(videoogl
videocommon PUBLIC
SOIL
common common
videocommon
PRIVATE
SOIL
${X11_LIBRARIES} ${X11_LIBRARIES}
) )
add_dolphin_library(videoogl "${SRCS}" "${LIBS}")

View File

@ -1,4 +1,4 @@
set(SRCS add_library(videosoftware
Clipper.cpp Clipper.cpp
DebugUtil.cpp DebugUtil.cpp
EfbCopy.cpp EfbCopy.cpp
@ -16,11 +16,12 @@ set(SRCS
TransformUnit.cpp TransformUnit.cpp
) )
set(LIBS target_link_libraries(videosoftware
videocommon PUBLIC
SOIL
common common
videocommon
PRIVATE
SOIL
${X11_LIBRARIES} ${X11_LIBRARIES}
) )
add_dolphin_library(videosoftware "${SRCS}" "${LIBS}")

View File

@ -1,4 +1,4 @@
set(SRCS add_library(videovulkan
BoundingBox.cpp BoundingBox.cpp
CommandBufferManager.cpp CommandBufferManager.cpp
FramebufferManager.cpp FramebufferManager.cpp
@ -27,23 +27,26 @@ set(SRCS
main.cpp 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 target_link_libraries(videovulkan
PUBLIC
common
videocommon
PRIVATE PRIVATE
# Link against glslang, the other necessary libraries are referenced by the executable.
glslang glslang
xxhash 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
)