diff options
Diffstat (limited to 'src')
| -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() | |||
| 38 | create_directory_groups(${SRCS} ${HEADERS}) | 38 | create_directory_groups(${SRCS} ${HEADERS}) |
| 39 | 39 | ||
| 40 | add_library(audio_core STATIC ${SRCS} ${HEADERS}) | 40 | add_library(audio_core STATIC ${SRCS} ${HEADERS}) |
| 41 | target_link_libraries(audio_core SoundTouch) | 41 | target_link_libraries(audio_core PUBLIC common core) |
| 42 | target_link_libraries(audio_core PRIVATE SoundTouch) | ||
| 42 | 43 | ||
| 43 | if(SDL2_FOUND) | 44 | if(SDL2_FOUND) |
| 44 | target_link_libraries(audio_core ${SDL2_LIBRARY}) | 45 | target_link_libraries(audio_core PRIVATE ${SDL2_LIBRARY}) |
| 45 | set_property(TARGET audio_core APPEND PROPERTY COMPILE_DEFINITIONS HAVE_SDL2) | 46 | target_compile_definitions(audio_core PRIVATE HAVE_SDL2) |
| 46 | endif() | 47 | 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}) | |||
| 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") |
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) | |||
| 91 | else() | 91 | else() |
| 92 | add_executable(citra-qt ${SRCS} ${HEADERS} ${UI_HDRS}) | 92 | add_executable(citra-qt ${SRCS} ${HEADERS} ${UI_HDRS}) |
| 93 | endif() | 93 | endif() |
| 94 | target_link_libraries(citra-qt core video_core audio_core common input_common) | 94 | target_link_libraries(citra-qt PRIVATE audio_core common core input_common video_core) |
| 95 | target_link_libraries(citra-qt ${OPENGL_gl_LIBRARY} ${CITRA_QT_LIBS}) | 95 | target_link_libraries(citra-qt PRIVATE ${OPENGL_gl_LIBRARY} ${CITRA_QT_LIBS} glad) |
| 96 | target_link_libraries(citra-qt ${PLATFORM_LIBRARIES} Threads::Threads) | 96 | target_link_libraries(citra-qt PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads) |
| 97 | 97 | ||
| 98 | if(UNIX AND NOT APPLE) | 98 | if(UNIX AND NOT APPLE) |
| 99 | install(TARGETS citra-qt RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin") | 99 | 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}) | |||
| 96 | 96 | ||
| 97 | add_library(common STATIC ${SRCS} ${HEADERS}) | 97 | add_library(common STATIC ${SRCS} ${HEADERS}) |
| 98 | if (ARCHITECTURE_x86_64) | 98 | if (ARCHITECTURE_x86_64) |
| 99 | target_link_libraries(common xbyak) | 99 | target_link_libraries(common PRIVATE xbyak) |
| 100 | endif() | 100 | 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) | |||
| 380 | create_directory_groups(${SRCS} ${HEADERS}) | 380 | create_directory_groups(${SRCS} ${HEADERS}) |
| 381 | 381 | ||
| 382 | add_library(core STATIC ${SRCS} ${HEADERS}) | 382 | add_library(core STATIC ${SRCS} ${HEADERS}) |
| 383 | 383 | target_link_libraries(core PUBLIC common PRIVATE audio_core video_core) | |
| 384 | target_link_libraries(core dynarmic cryptopp) | 384 | 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() | |||
| 19 | create_directory_groups(${SRCS} ${HEADERS}) | 19 | create_directory_groups(${SRCS} ${HEADERS}) |
| 20 | 20 | ||
| 21 | add_library(input_common STATIC ${SRCS} ${HEADERS}) | 21 | add_library(input_common STATIC ${SRCS} ${HEADERS}) |
| 22 | target_link_libraries(input_common common core) | 22 | target_link_libraries(input_common PUBLIC core PRIVATE common) |
| 23 | 23 | ||
| 24 | if(SDL2_FOUND) | 24 | if(SDL2_FOUND) |
| 25 | target_link_libraries(input_common ${SDL2_LIBRARY}) | 25 | target_link_libraries(input_common PRIVATE ${SDL2_LIBRARY}) |
| 26 | set_property(TARGET input_common APPEND PROPERTY COMPILE_DEFINITIONS HAVE_SDL2) | 26 | target_compile_definitions(input_common PRIVATE HAVE_SDL2) |
| 27 | endif() | 27 | 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}) | |||
| 13 | include_directories(../../externals/catch/single_include/) | 13 | include_directories(../../externals/catch/single_include/) |
| 14 | 14 | ||
| 15 | add_executable(tests ${SRCS} ${HEADERS}) | 15 | add_executable(tests ${SRCS} ${HEADERS}) |
| 16 | target_link_libraries(tests core video_core audio_core common) | 16 | target_link_libraries(tests PRIVATE common core) |
| 17 | target_link_libraries(tests ${PLATFORM_LIBRARIES} Threads::Threads) | 17 | target_link_libraries(tests PRIVATE glad) # To support linker work-around |
| 18 | target_link_libraries(tests PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads) | ||
| 18 | 19 | ||
| 19 | add_test(NAME tests COMMAND $<TARGET_FILE:tests>) | 20 | 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() | |||
| 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() |