diff options
| author | 2017-05-28 01:01:00 -0700 | |
|---|---|---|
| committer | 2017-05-28 01:01:00 -0700 | |
| commit | 4caa2bad9d57c97aa749d3a44f6be6f593bb798b (patch) | |
| tree | ba001a9832ee8965963d17fd4e93e9222e1153de /src/citra | |
| parent | Merge pull request #2732 from yuriks/add-fmt (diff) | |
| parent | CMake: Correct inter-module dependencies and library visibility (diff) | |
| download | yuzu-4caa2bad9d57c97aa749d3a44f6be6f593bb798b.tar.gz yuzu-4caa2bad9d57c97aa749d3a44f6be6f593bb798b.tar.xz yuzu-4caa2bad9d57c97aa749d3a44f6be6f593bb798b.zip | |
Merge pull request #2733 from yuriks/cmake-cleanup
Dependencies and build system cleanup
Diffstat (limited to 'src/citra')
| -rw-r--r-- | src/citra/CMakeLists.txt | 8 | ||||
| -rw-r--r-- | src/citra/citra.cpp | 1 | ||||
| -rw-r--r-- | src/citra/config.cpp | 4 | ||||
| -rw-r--r-- | src/citra/config.h | 4 | ||||
| -rw-r--r-- | src/citra/emu_window/emu_window_sdl2.cpp | 14 |
5 files changed, 17 insertions, 14 deletions
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/citra.cpp b/src/citra/citra.cpp index 76f5caeb1..c0dac9e8f 100644 --- a/src/citra/citra.cpp +++ b/src/citra/citra.cpp | |||
| @@ -33,7 +33,6 @@ | |||
| 33 | #include "core/gdbstub/gdbstub.h" | 33 | #include "core/gdbstub/gdbstub.h" |
| 34 | #include "core/loader/loader.h" | 34 | #include "core/loader/loader.h" |
| 35 | #include "core/settings.h" | 35 | #include "core/settings.h" |
| 36 | #include "video_core/video_core.h" | ||
| 37 | 36 | ||
| 38 | static void PrintHelp(const char* argv0) { | 37 | static void PrintHelp(const char* argv0) { |
| 39 | std::cout << "Usage: " << argv0 | 38 | std::cout << "Usage: " << argv0 |
diff --git a/src/citra/config.cpp b/src/citra/config.cpp index a4162e9ad..f08b4069c 100644 --- a/src/citra/config.cpp +++ b/src/citra/config.cpp | |||
| @@ -5,11 +5,11 @@ | |||
| 5 | #include <memory> | 5 | #include <memory> |
| 6 | #include <SDL.h> | 6 | #include <SDL.h> |
| 7 | #include <inih/cpp/INIReader.h> | 7 | #include <inih/cpp/INIReader.h> |
| 8 | #include "citra/config.h" | ||
| 8 | #include "citra/default_ini.h" | 9 | #include "citra/default_ini.h" |
| 9 | #include "common/file_util.h" | 10 | #include "common/file_util.h" |
| 10 | #include "common/logging/log.h" | 11 | #include "common/logging/log.h" |
| 11 | #include "common/param_package.h" | 12 | #include "common/param_package.h" |
| 12 | #include "config.h" | ||
| 13 | #include "core/settings.h" | 13 | #include "core/settings.h" |
| 14 | #include "input_common/main.h" | 14 | #include "input_common/main.h" |
| 15 | 15 | ||
| @@ -21,6 +21,8 @@ Config::Config() { | |||
| 21 | Reload(); | 21 | Reload(); |
| 22 | } | 22 | } |
| 23 | 23 | ||
| 24 | Config::~Config() = default; | ||
| 25 | |||
| 24 | bool Config::LoadINI(const std::string& default_contents, bool retry) { | 26 | bool Config::LoadINI(const std::string& default_contents, bool retry) { |
| 25 | const char* location = this->sdl2_config_loc.c_str(); | 27 | const char* location = this->sdl2_config_loc.c_str(); |
| 26 | if (sdl2_config->ParseError() < 0) { | 28 | if (sdl2_config->ParseError() < 0) { |
diff --git a/src/citra/config.h b/src/citra/config.h index b1c31f59c..abc90f642 100644 --- a/src/citra/config.h +++ b/src/citra/config.h | |||
| @@ -6,7 +6,8 @@ | |||
| 6 | 6 | ||
| 7 | #include <memory> | 7 | #include <memory> |
| 8 | #include <string> | 8 | #include <string> |
| 9 | #include <inih/cpp/INIReader.h> | 9 | |
| 10 | class INIReader; | ||
| 10 | 11 | ||
| 11 | class Config { | 12 | class Config { |
| 12 | std::unique_ptr<INIReader> sdl2_config; | 13 | std::unique_ptr<INIReader> sdl2_config; |
| @@ -17,6 +18,7 @@ class Config { | |||
| 17 | 18 | ||
| 18 | public: | 19 | public: |
| 19 | Config(); | 20 | Config(); |
| 21 | ~Config(); | ||
| 20 | 22 | ||
| 21 | void Reload(); | 23 | void Reload(); |
| 22 | }; | 24 | }; |
diff --git a/src/citra/emu_window/emu_window_sdl2.cpp b/src/citra/emu_window/emu_window_sdl2.cpp index 6bc0b0d00..47aadd60c 100644 --- a/src/citra/emu_window/emu_window_sdl2.cpp +++ b/src/citra/emu_window/emu_window_sdl2.cpp | |||
| @@ -12,10 +12,10 @@ | |||
| 12 | #include "common/logging/log.h" | 12 | #include "common/logging/log.h" |
| 13 | #include "common/scm_rev.h" | 13 | #include "common/scm_rev.h" |
| 14 | #include "common/string_util.h" | 14 | #include "common/string_util.h" |
| 15 | #include "core/3ds.h" | ||
| 15 | #include "core/settings.h" | 16 | #include "core/settings.h" |
| 16 | #include "input_common/keyboard.h" | 17 | #include "input_common/keyboard.h" |
| 17 | #include "input_common/main.h" | 18 | #include "input_common/main.h" |
| 18 | #include "video_core/video_core.h" | ||
| 19 | 19 | ||
| 20 | void EmuWindow_SDL2::OnMouseMotion(s32 x, s32 y) { | 20 | void EmuWindow_SDL2::OnMouseMotion(s32 x, s32 y) { |
| 21 | TouchMoved((unsigned)std::max(x, 0), (unsigned)std::max(y, 0)); | 21 | TouchMoved((unsigned)std::max(x, 0), (unsigned)std::max(y, 0)); |
| @@ -80,12 +80,12 @@ EmuWindow_SDL2::EmuWindow_SDL2() { | |||
| 80 | 80 | ||
| 81 | std::string window_title = Common::StringFromFormat("Citra %s| %s-%s ", Common::g_build_name, | 81 | std::string window_title = Common::StringFromFormat("Citra %s| %s-%s ", Common::g_build_name, |
| 82 | Common::g_scm_branch, Common::g_scm_desc); | 82 | Common::g_scm_branch, Common::g_scm_desc); |
| 83 | render_window = SDL_CreateWindow( | 83 | render_window = |
| 84 | window_title.c_str(), | 84 | SDL_CreateWindow(window_title.c_str(), |
| 85 | SDL_WINDOWPOS_UNDEFINED, // x position | 85 | SDL_WINDOWPOS_UNDEFINED, // x position |
| 86 | SDL_WINDOWPOS_UNDEFINED, // y position | 86 | SDL_WINDOWPOS_UNDEFINED, // y position |
| 87 | VideoCore::kScreenTopWidth, VideoCore::kScreenTopHeight + VideoCore::kScreenBottomHeight, | 87 | Core::kScreenTopWidth, Core::kScreenTopHeight + Core::kScreenBottomHeight, |
| 88 | SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI); | 88 | SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI); |
| 89 | 89 | ||
| 90 | if (render_window == nullptr) { | 90 | if (render_window == nullptr) { |
| 91 | LOG_CRITICAL(Frontend, "Failed to create SDL2 window! Exiting..."); | 91 | LOG_CRITICAL(Frontend, "Failed to create SDL2 window! Exiting..."); |