summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/audio_core/CMakeLists.txt7
-rw-r--r--src/citra/CMakeLists.txt8
-rw-r--r--src/citra_qt/CMakeLists.txt6
-rw-r--r--src/common/CMakeLists.txt2
-rw-r--r--src/core/CMakeLists.txt4
-rw-r--r--src/input_common/CMakeLists.txt6
-rw-r--r--src/tests/CMakeLists.txt5
-rw-r--r--src/video_core/CMakeLists.txt12
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()
38create_directory_groups(${SRCS} ${HEADERS}) 38create_directory_groups(${SRCS} ${HEADERS})
39 39
40add_library(audio_core STATIC ${SRCS} ${HEADERS}) 40add_library(audio_core STATIC ${SRCS} ${HEADERS})
41target_link_libraries(audio_core SoundTouch) 41target_link_libraries(audio_core PUBLIC common core)
42target_link_libraries(audio_core PRIVATE SoundTouch)
42 43
43if(SDL2_FOUND) 44if(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)
46endif() 47endif()
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})
18include_directories(${SDL2_INCLUDE_DIR}) 18include_directories(${SDL2_INCLUDE_DIR})
19 19
20add_executable(citra ${SRCS} ${HEADERS}) 20add_executable(citra ${SRCS} ${HEADERS})
21target_link_libraries(citra core video_core audio_core common input_common) 21target_link_libraries(citra PRIVATE common core input_common)
22target_link_libraries(citra ${SDL2_LIBRARY} ${OPENGL_gl_LIBRARY} inih glad) 22target_link_libraries(citra PRIVATE ${SDL2_LIBRARY} ${OPENGL_gl_LIBRARY} inih glad)
23if (MSVC) 23if (MSVC)
24 target_link_libraries(citra getopt) 24 target_link_libraries(citra PRIVATE getopt)
25endif() 25endif()
26target_link_libraries(citra ${PLATFORM_LIBRARIES} Threads::Threads) 26target_link_libraries(citra PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads)
27 27
28if(UNIX AND NOT APPLE) 28if(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)
91else() 91else()
92 add_executable(citra-qt ${SRCS} ${HEADERS} ${UI_HDRS}) 92 add_executable(citra-qt ${SRCS} ${HEADERS} ${UI_HDRS})
93endif() 93endif()
94target_link_libraries(citra-qt core video_core audio_core common input_common) 94target_link_libraries(citra-qt PRIVATE audio_core common core input_common video_core)
95target_link_libraries(citra-qt ${OPENGL_gl_LIBRARY} ${CITRA_QT_LIBS}) 95target_link_libraries(citra-qt PRIVATE ${OPENGL_gl_LIBRARY} ${CITRA_QT_LIBS} glad)
96target_link_libraries(citra-qt ${PLATFORM_LIBRARIES} Threads::Threads) 96target_link_libraries(citra-qt PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads)
97 97
98if(UNIX AND NOT APPLE) 98if(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
97add_library(common STATIC ${SRCS} ${HEADERS}) 97add_library(common STATIC ${SRCS} ${HEADERS})
98if (ARCHITECTURE_x86_64) 98if (ARCHITECTURE_x86_64)
99 target_link_libraries(common xbyak) 99 target_link_libraries(common PRIVATE xbyak)
100endif() 100endif()
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)
380create_directory_groups(${SRCS} ${HEADERS}) 380create_directory_groups(${SRCS} ${HEADERS})
381 381
382add_library(core STATIC ${SRCS} ${HEADERS}) 382add_library(core STATIC ${SRCS} ${HEADERS})
383 383target_link_libraries(core PUBLIC common PRIVATE audio_core video_core)
384target_link_libraries(core dynarmic cryptopp) 384target_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()
19create_directory_groups(${SRCS} ${HEADERS}) 19create_directory_groups(${SRCS} ${HEADERS})
20 20
21add_library(input_common STATIC ${SRCS} ${HEADERS}) 21add_library(input_common STATIC ${SRCS} ${HEADERS})
22target_link_libraries(input_common common core) 22target_link_libraries(input_common PUBLIC core PRIVATE common)
23 23
24if(SDL2_FOUND) 24if(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)
27endif() 27endif()
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})
13include_directories(../../externals/catch/single_include/) 13include_directories(../../externals/catch/single_include/)
14 14
15add_executable(tests ${SRCS} ${HEADERS}) 15add_executable(tests ${SRCS} ${HEADERS})
16target_link_libraries(tests core video_core audio_core common) 16target_link_libraries(tests PRIVATE common core)
17target_link_libraries(tests ${PLATFORM_LIBRARIES} Threads::Threads) 17target_link_libraries(tests PRIVATE glad) # To support linker work-around
18target_link_libraries(tests PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads)
18 19
19add_test(NAME tests COMMAND $<TARGET_FILE:tests>) 20add_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()
79create_directory_groups(${SRCS} ${HEADERS}) 79create_directory_groups(${SRCS} ${HEADERS})
80 80
81add_library(video_core STATIC ${SRCS} ${HEADERS}) 81add_library(video_core STATIC ${SRCS} ${HEADERS})
82target_link_libraries(video_core glad) 82target_link_libraries(video_core PUBLIC common core)
83target_link_libraries(video_core PRIVATE glad)
84
83if (ARCHITECTURE_x86_64) 85if (ARCHITECTURE_x86_64)
84 target_link_libraries(video_core xbyak) 86 target_link_libraries(video_core PRIVATE xbyak)
85endif() 87endif()
86 88
87if (PNG_FOUND) 89if (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})
91endif() 93endif()