From 4660bc1c786b5f9d3fed74b6b51a8ba3e468d7e4 Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Sat, 27 May 2017 19:05:50 -0700 Subject: CMake: Use IMPORTED target for libpng --- src/video_core/CMakeLists.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/video_core/CMakeLists.txt b/src/video_core/CMakeLists.txt index e455f03bd..45f4ad2d5 100644 --- a/src/video_core/CMakeLists.txt +++ b/src/video_core/CMakeLists.txt @@ -87,7 +87,6 @@ if (ARCHITECTURE_x86_64) endif() if (PNG_FOUND) - 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}) + target_link_libraries(video_core PRIVATE PNG::PNG) + target_compile_definitions(video_core PRIVATE HAVE_PNG) endif() -- cgit v1.2.3 From 0f563111a2048228f10f5a565f57fc10bffd11e3 Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Sat, 27 May 2017 19:21:06 -0700 Subject: CMake: Use IMPORTED target for Boost --- src/citra_qt/CMakeLists.txt | 2 +- src/common/CMakeLists.txt | 1 + src/core/CMakeLists.txt | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/citra_qt/CMakeLists.txt b/src/citra_qt/CMakeLists.txt index 809e0b938..e2b77a34f 100644 --- a/src/citra_qt/CMakeLists.txt +++ b/src/citra_qt/CMakeLists.txt @@ -92,7 +92,7 @@ else() add_executable(citra-qt ${SRCS} ${HEADERS} ${UI_HDRS}) endif() 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 ${OPENGL_gl_LIBRARY} ${CITRA_QT_LIBS} Boost::boost glad) target_link_libraries(citra-qt PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads) if(UNIX AND NOT APPLE) diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index a33a8cdbe..3899007fe 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -95,6 +95,7 @@ endif() create_directory_groups(${SRCS} ${HEADERS}) add_library(common STATIC ${SRCS} ${HEADERS}) +target_link_libraries(common PUBLIC Boost::boost) if (ARCHITECTURE_x86_64) target_link_libraries(common PRIVATE xbyak) endif() diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 7aa81e885..acc261e31 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -381,4 +381,4 @@ create_directory_groups(${SRCS} ${HEADERS}) add_library(core STATIC ${SRCS} ${HEADERS}) target_link_libraries(core PUBLIC common PRIVATE audio_core video_core) -target_link_libraries(core PRIVATE cryptopp dynarmic) +target_link_libraries(core PUBLIC Boost::boost PRIVATE cryptopp dynarmic) -- cgit v1.2.3 From 089baa04e851676c1c04e640ef137b9025d6e5dc Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Sat, 27 May 2017 19:46:26 -0700 Subject: CMake: Stop using FindOpenGL, which seems to not be required anymore --- src/citra/CMakeLists.txt | 2 +- src/citra_qt/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/citra/CMakeLists.txt b/src/citra/CMakeLists.txt index 9eddb342b..f6f2e8e91 100644 --- a/src/citra/CMakeLists.txt +++ b/src/citra/CMakeLists.txt @@ -19,7 +19,7 @@ include_directories(${SDL2_INCLUDE_DIR}) add_executable(citra ${SRCS} ${HEADERS}) target_link_libraries(citra PRIVATE common core input_common) -target_link_libraries(citra PRIVATE ${SDL2_LIBRARY} ${OPENGL_gl_LIBRARY} inih glad) +target_link_libraries(citra PRIVATE ${SDL2_LIBRARY} inih glad) if (MSVC) target_link_libraries(citra PRIVATE getopt) endif() diff --git a/src/citra_qt/CMakeLists.txt b/src/citra_qt/CMakeLists.txt index e2b77a34f..839ce600b 100644 --- a/src/citra_qt/CMakeLists.txt +++ b/src/citra_qt/CMakeLists.txt @@ -92,7 +92,7 @@ else() add_executable(citra-qt ${SRCS} ${HEADERS} ${UI_HDRS}) endif() 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} Boost::boost glad) +target_link_libraries(citra-qt PRIVATE ${CITRA_QT_LIBS} Boost::boost glad) target_link_libraries(citra-qt PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads) if(UNIX AND NOT APPLE) -- cgit v1.2.3 From 34b6c8bd8853964fde3bcff95150af561415c26c Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Sat, 27 May 2017 20:53:39 -0700 Subject: CMake: Remove CITRA_QT_LIBS var This used to be required to support both Qt4 and Qt5, but we dropped Qt4 so it's not needed anymore. --- src/citra_qt/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/citra_qt/CMakeLists.txt b/src/citra_qt/CMakeLists.txt index 839ce600b..a70686286 100644 --- a/src/citra_qt/CMakeLists.txt +++ b/src/citra_qt/CMakeLists.txt @@ -92,7 +92,7 @@ else() add_executable(citra-qt ${SRCS} ${HEADERS} ${UI_HDRS}) endif() target_link_libraries(citra-qt PRIVATE audio_core common core input_common video_core) -target_link_libraries(citra-qt PRIVATE ${CITRA_QT_LIBS} Boost::boost glad) +target_link_libraries(citra-qt PRIVATE Boost::boost glad Qt5::OpenGL Qt5::Widgets) target_link_libraries(citra-qt PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads) if(UNIX AND NOT APPLE) -- cgit v1.2.3 From 776cb917850c9d36ffd886de2dc93f6b42b879db Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Sat, 27 May 2017 21:38:49 -0700 Subject: CMake: Define an interface target for SDL2 definitions --- src/audio_core/CMakeLists.txt | 3 +-- src/citra/CMakeLists.txt | 6 ++---- src/input_common/CMakeLists.txt | 3 +-- 3 files changed, 4 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/audio_core/CMakeLists.txt b/src/audio_core/CMakeLists.txt index c571213fc..ecd3025cc 100644 --- a/src/audio_core/CMakeLists.txt +++ b/src/audio_core/CMakeLists.txt @@ -32,7 +32,6 @@ include_directories(../../externals/soundtouch/include) if(SDL2_FOUND) set(SRCS ${SRCS} sdl2_sink.cpp) set(HEADERS ${HEADERS} sdl2_sink.h) - include_directories(${SDL2_INCLUDE_DIR}) endif() create_directory_groups(${SRCS} ${HEADERS}) @@ -42,6 +41,6 @@ target_link_libraries(audio_core PUBLIC common core) target_link_libraries(audio_core PRIVATE SoundTouch) if(SDL2_FOUND) - target_link_libraries(audio_core PRIVATE ${SDL2_LIBRARY}) + target_link_libraries(audio_core PRIVATE SDL2) target_compile_definitions(audio_core PRIVATE HAVE_SDL2) endif() diff --git a/src/citra/CMakeLists.txt b/src/citra/CMakeLists.txt index f6f2e8e91..d72d2b5f4 100644 --- a/src/citra/CMakeLists.txt +++ b/src/citra/CMakeLists.txt @@ -15,15 +15,13 @@ set(HEADERS create_directory_groups(${SRCS} ${HEADERS}) -include_directories(${SDL2_INCLUDE_DIR}) - add_executable(citra ${SRCS} ${HEADERS}) target_link_libraries(citra PRIVATE common core input_common) -target_link_libraries(citra PRIVATE ${SDL2_LIBRARY} inih glad) +target_link_libraries(citra PRIVATE inih glad) if (MSVC) target_link_libraries(citra PRIVATE getopt) endif() -target_link_libraries(citra PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads) +target_link_libraries(citra PRIVATE ${PLATFORM_LIBRARIES} SDL2 Threads::Threads) if(UNIX AND NOT APPLE) install(TARGETS citra RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin") diff --git a/src/input_common/CMakeLists.txt b/src/input_common/CMakeLists.txt index 5b306e42e..e3e36ada7 100644 --- a/src/input_common/CMakeLists.txt +++ b/src/input_common/CMakeLists.txt @@ -13,7 +13,6 @@ set(HEADERS if(SDL2_FOUND) set(SRCS ${SRCS} sdl/sdl.cpp) set(HEADERS ${HEADERS} sdl/sdl.h) - include_directories(${SDL2_INCLUDE_DIR}) endif() create_directory_groups(${SRCS} ${HEADERS}) @@ -22,6 +21,6 @@ add_library(input_common STATIC ${SRCS} ${HEADERS}) target_link_libraries(input_common PUBLIC core PRIVATE common) if(SDL2_FOUND) - target_link_libraries(input_common PRIVATE ${SDL2_LIBRARY}) + target_link_libraries(input_common PRIVATE SDL2) target_compile_definitions(input_common PRIVATE HAVE_SDL2) endif() -- cgit v1.2.3 From 74afcd53286f0cae1782f7449084192f6b8619ff Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Sat, 27 May 2017 22:09:28 -0700 Subject: CMake: Add SoundTouch include path to target property --- src/audio_core/CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) (limited to 'src') diff --git a/src/audio_core/CMakeLists.txt b/src/audio_core/CMakeLists.txt index ecd3025cc..0ad86bb7a 100644 --- a/src/audio_core/CMakeLists.txt +++ b/src/audio_core/CMakeLists.txt @@ -27,8 +27,6 @@ set(HEADERS time_stretch.h ) -include_directories(../../externals/soundtouch/include) - if(SDL2_FOUND) set(SRCS ${SRCS} sdl2_sink.cpp) set(HEADERS ${HEADERS} sdl2_sink.h) -- cgit v1.2.3 From 4f84372bc20bbdc7a14e6d49edd1fda498a3ec54 Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Sat, 27 May 2017 22:16:57 -0700 Subject: CMake: Add cryptopp include path to target property --- src/core/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index acc261e31..31152abd5 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -375,7 +375,6 @@ set(HEADERS ) include_directories(../../externals/dynarmic/include) -include_directories(../../externals/cryptopp) create_directory_groups(${SRCS} ${HEADERS}) -- cgit v1.2.3 From 3b68600f81078c5cc56f8697746d9ea5a4281d76 Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Sat, 27 May 2017 22:19:37 -0700 Subject: CMake: Remove unnecessary include_directories for dynarmic Dynarmic already adds the correct include paths to the library target. --- src/core/CMakeLists.txt | 3 --- 1 file changed, 3 deletions(-) (limited to 'src') diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 31152abd5..3cdb2b817 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -374,10 +374,7 @@ set(HEADERS telemetry_session.h ) -include_directories(../../externals/dynarmic/include) - create_directory_groups(${SRCS} ${HEADERS}) - add_library(core STATIC ${SRCS} ${HEADERS}) target_link_libraries(core PUBLIC common PRIVATE audio_core video_core) target_link_libraries(core PUBLIC Boost::boost PRIVATE cryptopp dynarmic) -- cgit v1.2.3 From d736cca848a12788652e366b5554063c99f06cca Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Sat, 27 May 2017 22:34:52 -0700 Subject: CMake: Create INTERFACE targets for microprofile and nihstro --- src/citra_qt/CMakeLists.txt | 2 +- src/common/CMakeLists.txt | 2 +- src/video_core/CMakeLists.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/citra_qt/CMakeLists.txt b/src/citra_qt/CMakeLists.txt index a70686286..4841cbf05 100644 --- a/src/citra_qt/CMakeLists.txt +++ b/src/citra_qt/CMakeLists.txt @@ -92,7 +92,7 @@ else() add_executable(citra-qt ${SRCS} ${HEADERS} ${UI_HDRS}) endif() target_link_libraries(citra-qt PRIVATE audio_core common core input_common video_core) -target_link_libraries(citra-qt PRIVATE Boost::boost glad Qt5::OpenGL Qt5::Widgets) +target_link_libraries(citra-qt PRIVATE Boost::boost glad nihstro-headers Qt5::OpenGL Qt5::Widgets) target_link_libraries(citra-qt PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads) if(UNIX AND NOT APPLE) diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 3899007fe..7e83e64b0 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -95,7 +95,7 @@ endif() create_directory_groups(${SRCS} ${HEADERS}) add_library(common STATIC ${SRCS} ${HEADERS}) -target_link_libraries(common PUBLIC Boost::boost) +target_link_libraries(common PUBLIC Boost::boost microprofile) if (ARCHITECTURE_x86_64) target_link_libraries(common PRIVATE xbyak) endif() diff --git a/src/video_core/CMakeLists.txt b/src/video_core/CMakeLists.txt index 45f4ad2d5..0961a3251 100644 --- a/src/video_core/CMakeLists.txt +++ b/src/video_core/CMakeLists.txt @@ -80,7 +80,7 @@ create_directory_groups(${SRCS} ${HEADERS}) add_library(video_core STATIC ${SRCS} ${HEADERS}) target_link_libraries(video_core PUBLIC common core) -target_link_libraries(video_core PRIVATE glad) +target_link_libraries(video_core PRIVATE glad nihstro-headers) if (ARCHITECTURE_x86_64) target_link_libraries(video_core PRIVATE xbyak) -- cgit v1.2.3 From cebdae6c92f56b4e56b4aedd5d65c7fff0c7e44f Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Sat, 27 May 2017 22:46:59 -0700 Subject: CMake: Create an INTERFACE target for Catch --- src/tests/CMakeLists.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index 85f2f2985..00d7c636a 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -10,11 +10,9 @@ set(HEADERS create_directory_groups(${SRCS} ${HEADERS}) -include_directories(../../externals/catch/single_include/) - add_executable(tests ${SRCS} ${HEADERS}) 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) +target_link_libraries(tests PRIVATE ${PLATFORM_LIBRARIES} catch-single-include Threads::Threads) -add_test(NAME tests COMMAND $) +add_test(NAME tests COMMAND tests) -- cgit v1.2.3