diff options
Diffstat (limited to '')
-rw-r--r-- | src/audio_core/CMakeLists.txt | 7 | ||||
-rw-r--r-- | src/citra/CMakeLists.txt | 8 | ||||
-rw-r--r-- | src/citra_qt/CMakeLists.txt | 6 | ||||
-rw-r--r-- | src/common/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/core/CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/input_common/CMakeLists.txt | 6 | ||||
-rw-r--r-- | src/tests/CMakeLists.txt | 5 | ||||
-rw-r--r-- | src/video_core/CMakeLists.txt | 12 |
8 files changed, 27 insertions, 23 deletions
diff --git a/src/audio_core/CMakeLists.txt b/src/audio_core/CMakeLists.txt index a72a907ef..c571213fc 100644 --- a/src/audio_core/CMakeLists.txt +++ b/src/audio_core/CMakeLists.txt @@ -38,9 +38,10 @@ endif() create_directory_groups(${SRCS} ${HEADERS}) add_library(audio_core STATIC ${SRCS} ${HEADERS}) -target_link_libraries(audio_core SoundTouch) +target_link_libraries(audio_core PUBLIC common core) +target_link_libraries(audio_core PRIVATE SoundTouch) if(SDL2_FOUND) - target_link_libraries(audio_core ${SDL2_LIBRARY}) - set_property(TARGET audio_core APPEND PROPERTY COMPILE_DEFINITIONS HAVE_SDL2) + target_link_libraries(audio_core PRIVATE ${SDL2_LIBRARY}) + target_compile_definitions(audio_core PRIVATE HAVE_SDL2) endif() 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") diff --git a/src/citra_qt/CMakeLists.txt b/src/citra_qt/CMakeLists.txt index 4e837668e..809e0b938 100644 --- a/src/citra_qt/CMakeLists.txt +++ b/src/citra_qt/CMakeLists.txt @@ -91,9 +91,9 @@ if (APPLE) else() add_executable(citra-qt ${SRCS} ${HEADERS} ${UI_HDRS}) endif() -target_link_libraries(citra-qt core video_core audio_core common input_common) -target_link_libraries(citra-qt ${OPENGL_gl_LIBRARY} ${CITRA_QT_LIBS}) -target_link_libraries(citra-qt ${PLATFORM_LIBRARIES} Threads::Threads) +target_link_libraries(citra-qt PRIVATE audio_core common core input_common video_core) +target_link_libraries(citra-qt PRIVATE ${OPENGL_gl_LIBRARY} ${CITRA_QT_LIBS} glad) +target_link_libraries(citra-qt PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads) if(UNIX AND NOT APPLE) install(TARGETS citra-qt RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin") diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 546a14500..a33a8cdbe 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -96,5 +96,5 @@ create_directory_groups(${SRCS} ${HEADERS}) add_library(common STATIC ${SRCS} ${HEADERS}) if (ARCHITECTURE_x86_64) - target_link_libraries(common xbyak) + target_link_libraries(common PRIVATE xbyak) endif() diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index cbfd1299c..7aa81e885 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -380,5 +380,5 @@ include_directories(../../externals/cryptopp) create_directory_groups(${SRCS} ${HEADERS}) add_library(core STATIC ${SRCS} ${HEADERS}) - -target_link_libraries(core dynarmic cryptopp) +target_link_libraries(core PUBLIC common PRIVATE audio_core video_core) +target_link_libraries(core PRIVATE cryptopp dynarmic) diff --git a/src/input_common/CMakeLists.txt b/src/input_common/CMakeLists.txt index cfe5caaa3..5b306e42e 100644 --- a/src/input_common/CMakeLists.txt +++ b/src/input_common/CMakeLists.txt @@ -19,9 +19,9 @@ endif() create_directory_groups(${SRCS} ${HEADERS}) add_library(input_common STATIC ${SRCS} ${HEADERS}) -target_link_libraries(input_common common core) +target_link_libraries(input_common PUBLIC core PRIVATE common) if(SDL2_FOUND) - target_link_libraries(input_common ${SDL2_LIBRARY}) - set_property(TARGET input_common APPEND PROPERTY COMPILE_DEFINITIONS HAVE_SDL2) + target_link_libraries(input_common PRIVATE ${SDL2_LIBRARY}) + target_compile_definitions(input_common PRIVATE HAVE_SDL2) endif() diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index d1144ba77..85f2f2985 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -13,7 +13,8 @@ create_directory_groups(${SRCS} ${HEADERS}) include_directories(../../externals/catch/single_include/) add_executable(tests ${SRCS} ${HEADERS}) -target_link_libraries(tests core video_core audio_core common) -target_link_libraries(tests ${PLATFORM_LIBRARIES} Threads::Threads) +target_link_libraries(tests PRIVATE common core) +target_link_libraries(tests PRIVATE glad) # To support linker work-around +target_link_libraries(tests PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads) add_test(NAME tests COMMAND $<TARGET_FILE:tests>) 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() create_directory_groups(${SRCS} ${HEADERS}) add_library(video_core STATIC ${SRCS} ${HEADERS}) -target_link_libraries(video_core glad) +target_link_libraries(video_core PUBLIC common core) +target_link_libraries(video_core PRIVATE glad) + if (ARCHITECTURE_x86_64) - target_link_libraries(video_core xbyak) + target_link_libraries(video_core PRIVATE xbyak) endif() if (PNG_FOUND) - target_link_libraries(video_core ${PNG_LIBRARIES}) - include_directories(${PNG_INCLUDE_DIRS}) - add_definitions(${PNG_DEFINITIONS}) + target_link_libraries(video_core PRIVATE ${PNG_LIBRARIES}) + target_include_directories(video_core PRIVATE ${PNG_INCLUDE_DIRS}) + target_compile_definitions(video_core PRIVATE ${PNG_DEFINITIONS}) endif() |