From 7b81903756451281bd1f07d8e9a2dceeff79df08 Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Sat, 27 May 2017 18:26:55 -0700 Subject: 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. --- src/citra/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/citra') 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}) include_directories(${SDL2_INCLUDE_DIR}) add_executable(citra ${SRCS} ${HEADERS}) -target_link_libraries(citra core video_core audio_core common input_common) -target_link_libraries(citra ${SDL2_LIBRARY} ${OPENGL_gl_LIBRARY} inih glad) +target_link_libraries(citra PRIVATE common core input_common) +target_link_libraries(citra PRIVATE ${SDL2_LIBRARY} ${OPENGL_gl_LIBRARY} inih glad) if (MSVC) - target_link_libraries(citra getopt) + target_link_libraries(citra PRIVATE getopt) endif() -target_link_libraries(citra ${PLATFORM_LIBRARIES} Threads::Threads) +target_link_libraries(citra PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads) if(UNIX AND NOT APPLE) install(TARGETS citra RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin") -- cgit v1.2.3