diff options
| author | 2017-05-27 18:26:55 -0700 | |
|---|---|---|
| committer | 2017-05-27 18:41:24 -0700 | |
| commit | 7b81903756451281bd1f07d8e9a2dceeff79df08 (patch) | |
| tree | ba001a9832ee8965963d17fd4e93e9222e1153de /src/citra | |
| 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/citra')
| -rw-r--r-- | src/citra/CMakeLists.txt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/citra/CMakeLists.txt b/src/citra/CMakeLists.txt index 47231ba71..9eddb342b 100644 --- a/src/citra/CMakeLists.txt +++ b/src/citra/CMakeLists.txt | |||
| @@ -18,12 +18,12 @@ create_directory_groups(${SRCS} ${HEADERS}) | |||
| 18 | include_directories(${SDL2_INCLUDE_DIR}) | 18 | include_directories(${SDL2_INCLUDE_DIR}) |
| 19 | 19 | ||
| 20 | add_executable(citra ${SRCS} ${HEADERS}) | 20 | add_executable(citra ${SRCS} ${HEADERS}) |
| 21 | target_link_libraries(citra core video_core audio_core common input_common) | 21 | target_link_libraries(citra PRIVATE common core input_common) |
| 22 | target_link_libraries(citra ${SDL2_LIBRARY} ${OPENGL_gl_LIBRARY} inih glad) | 22 | target_link_libraries(citra PRIVATE ${SDL2_LIBRARY} ${OPENGL_gl_LIBRARY} inih glad) |
| 23 | if (MSVC) | 23 | if (MSVC) |
| 24 | target_link_libraries(citra getopt) | 24 | target_link_libraries(citra PRIVATE getopt) |
| 25 | endif() | 25 | endif() |
| 26 | target_link_libraries(citra ${PLATFORM_LIBRARIES} Threads::Threads) | 26 | target_link_libraries(citra PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads) |
| 27 | 27 | ||
| 28 | if(UNIX AND NOT APPLE) | 28 | if(UNIX AND NOT APPLE) |
| 29 | install(TARGETS citra RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin") | 29 | install(TARGETS citra RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin") |