diff options
| author | 2017-05-27 18:26:55 -0700 | |
|---|---|---|
| committer | 2017-05-27 18:41:24 -0700 | |
| commit | 7b81903756451281bd1f07d8e9a2dceeff79df08 (patch) | |
| tree | ba001a9832ee8965963d17fd4e93e9222e1153de /src/video_core | |
| parent | Citra: Convert include into forward declaration (diff) | |
| download | yuzu-7b81903756451281bd1f07d8e9a2dceeff79df08.tar.gz yuzu-7b81903756451281bd1f07d8e9a2dceeff79df08.tar.xz yuzu-7b81903756451281bd1f07d8e9a2dceeff79df08.zip | |
CMake: Correct inter-module dependencies and library visibility
Modules didn't correctly define their dependencies before, which relied
on the frontends implicitly including every module for linking to
succeed.
Also changed every target_link_libraries call to specify visibility of
dependencies to avoid leaking definitions to dependents when not
necessary.
Diffstat (limited to 'src/video_core')
| -rw-r--r-- | src/video_core/CMakeLists.txt | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/video_core/CMakeLists.txt b/src/video_core/CMakeLists.txt index e00b88f71..e455f03bd 100644 --- a/src/video_core/CMakeLists.txt +++ b/src/video_core/CMakeLists.txt | |||
| @@ -79,13 +79,15 @@ endif() | |||
| 79 | create_directory_groups(${SRCS} ${HEADERS}) | 79 | create_directory_groups(${SRCS} ${HEADERS}) |
| 80 | 80 | ||
| 81 | add_library(video_core STATIC ${SRCS} ${HEADERS}) | 81 | add_library(video_core STATIC ${SRCS} ${HEADERS}) |
| 82 | target_link_libraries(video_core glad) | 82 | target_link_libraries(video_core PUBLIC common core) |
| 83 | target_link_libraries(video_core PRIVATE glad) | ||
| 84 | |||
| 83 | if (ARCHITECTURE_x86_64) | 85 | if (ARCHITECTURE_x86_64) |
| 84 | target_link_libraries(video_core xbyak) | 86 | target_link_libraries(video_core PRIVATE xbyak) |
| 85 | endif() | 87 | endif() |
| 86 | 88 | ||
| 87 | if (PNG_FOUND) | 89 | if (PNG_FOUND) |
| 88 | target_link_libraries(video_core ${PNG_LIBRARIES}) | 90 | target_link_libraries(video_core PRIVATE ${PNG_LIBRARIES}) |
| 89 | include_directories(${PNG_INCLUDE_DIRS}) | 91 | target_include_directories(video_core PRIVATE ${PNG_INCLUDE_DIRS}) |
| 90 | add_definitions(${PNG_DEFINITIONS}) | 92 | target_compile_definitions(video_core PRIVATE ${PNG_DEFINITIONS}) |
| 91 | endif() | 93 | endif() |