VERY experimental Nintendo Switch 2 emulator
C++
IT'S ALIVE!
archshift5a9c2ce5ea1b
diff --git a/CMakeLists.txt b/CMakeLists.txtindex a588fe1932..bd21af25e7 100644--- a/CMakeLists.txt+++ b/CMakeLists.txt@@ -2,7 +2,8 @@ cmake_minimum_required(VERSION 2.6)project(citra)-SET(GCC_COMPILE_FLAGS "-std=c++11 -fpermissive")+SET(CMAKE_CXX_FLAGS_DEBUG "-std=c++11 -fpermissive")+SET(CMAKE_CXX_FLAGS_RELEASE "-std=c++11 -fpermissive")# silence some spamadd_definitions(-Wno-attributes)@@ -11,11 +12,16 @@ add_definitions(${GCC_COMPILE_FLAGS})# dependency checkingset(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/CMakeTests)-include(FindOpenGL REQUIRED)include(FindX11 REQUIRED)find_package(PkgConfig REQUIRED)+find_package(GLEW REQUIRED)+find_package(OpenGL REQUIRED)pkg_search_module(GLFW REQUIRED glfw3)+IF (APPLE)+ FIND_LIBRARY(COREFOUNDATION_LIBRARY CoreFoundation)+ENDIF (APPLE)+include_directories(${GLFW_INCLUDE_DIRS})option(DISABLE_QT4 "Disable Qt4 GUI" OFF)if(NOT DISABLE_QT4)@@ -40,6 +46,7 @@ git_branch_name(GIT_BRANCH)# external includesinclude_directories(${OPENGL_INCLUDE_DIR})+include_directories(${GLEW_INCLUDE_DIR})# internal includesinclude_directories(src)diff --git a/src/citra/CMakeLists.txt b/src/citra/CMakeLists.txtindex 0023da2bf4..d7478a2d23 100644--- a/src/citra/CMakeLists.txt+++ b/src/citra/CMakeLists.txt@@ -1,12 +1,14 @@set(SRCS citra.cppemu_window/emu_window_glfw.cpp)+set(HEADS citra.h+ resource.h)# NOTE: This is a workaround for CMake bug 0006976 (missing X11_xf86vmode_LIB variable)if (NOT X11_xf86vmode_LIB)set(X11_xv86vmode_LIB Xxf86vm)endif()-add_executable(citra ${SRCS})+add_executable(citra ${SRCS} ${HEADS})target_link_libraries(citra core common video_core GLEW pthread X11 Xxf86vm Xi ${OPENGL_LIBRARIES} ${GLFW_LIBRARIES} rt ${X11_Xrandr_LIB} ${X11_xv86vmode_LIB})#install(TARGETS citra RUNTIME DESTINATION ${bindir})diff --git a/src/citra_qt/CMakeLists.txt b/src/citra_qt/CMakeLists.txtindex 594460a715..abca202ea2 100644--- a/src/citra_qt/CMakeLists.txt+++ b/src/citra_qt/CMakeLists.txt@@ -8,6 +8,23 @@ set(SRCSmain.cppconfig/controller_config.cppconfig/controller_config_util.cpp)+set (HEADS+ bootmanager.hxx+ debugger/callstack.hxx+ debugger/disassembler.hxx+ debugger/ramview.hxx+ debugger/registers.hxx+ hotkeys.hxx+ main.hxx+ ui_callstack.h+ ui_controller_config.h+ ui_disassembler.h+ ui_hotkeys.h+ ui_main.h+ ui_registers.h+ version.h+ config/controller_config.hxx+ config/controller_config_util.hxx)qt4_wrap_ui(UI_HDRSdebugger/callstack.ui@@ -32,7 +49,11 @@ qt4_wrap_cpp(MOC_SRCSinclude_directories(${CMAKE_CURRENT_BINARY_DIR})include_directories(./)-add_executable(citra-qt ${SRCS} ${MOC_SRCS} ${UI_HDRS})-target_link_libraries(citra-qt core common video_core qhexedit ${QT_LIBRARIES} ${OPENGL_LIBRARIES} ${SDL2_LIBRARY} rt GLEW ${GLFW_LIBRARIES})+add_executable(citra-qt ${SRCS} ${HEADS} ${MOC_SRCS} ${UI_HDRS})+if (APPLE)+ target_link_libraries(citra-qt core common video_core qhexedit iconv ${COREFOUNDATION_LIBRARY} ${QT_LIBRARIES} ${GLEW_LIBRARY} ${OPENGL_LIBRARIES})+else()++endif()#install(TARGETS citra-qt RUNTIME DESTINATION ${bindir})diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txtindex 5eaf673652..48f30de4cb 100644--- a/src/common/CMakeLists.txt+++ b/src/common/CMakeLists.txt@@ -19,4 +19,42 @@ set(SRCS break_points.cpptimer.cpputf8.cpp)-add_library(common STATIC ${SRCS})+set(HEADS atomic.h+ atomic_gcc.h+ atomic_win32.h+ break_points.h+ chunk_file.h+ common_funcs.h+ common_paths.h+ common_types.h+ common.h+ console_listener.h+ cpu_detect.h+ debug_interface.h+ emu_window.h+ extended_trace.h+ fifo_queue.h+ file_search.h+ file_util.h+ hash.h+ linear_disk_cache.h+ log_manager.h+ log.h+ math_util.h+ mem_arena.h+ memory_util.h+ msg_handler.h+ platform.h+ scm_rev.h+ std_condition_variable.h+ std_mutex.h+ std_thread.h+ string_util.h+ swap.h+ symbols.h+ thread.h+ thunk.h+ timer.h+ utf8.h)++add_library(common STATIC ${SRCS} ${HEADS})diff --git a/src/video_core/CMakeLists.txt b/src/video_core/CMakeLists.txtindex 56394b9305..8d04d381cc 100644--- a/src/video_core/CMakeLists.txt+++ b/src/video_core/CMakeLists.txt@@ -2,4 +2,9 @@ set(SRCS video_core.cpputils.cpprenderer_opengl/renderer_opengl.cpp)-add_library(video_core STATIC ${SRCS})+set(HEADS video_core.h+ utils.h+ renderer_base.h+ renderer_opengl/renderer_opengl.h)++add_library(video_core STATIC ${SRCS} ${HEADS})