summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis-deps.sh14
-rw-r--r--CMakeLists.txt145
-rw-r--r--externals/qhexedit/CMakeLists.txt15
-rw-r--r--src/CMakeLists.txt13
-rw-r--r--src/citra/CMakeLists.txt24
-rw-r--r--src/citra_qt/CMakeLists.txt39
-rw-r--r--src/common/CMakeLists.txt23
-rw-r--r--src/core/CMakeLists.txt103
-rw-r--r--src/video_core/CMakeLists.txt39
9 files changed, 265 insertions, 150 deletions
diff --git a/.travis-deps.sh b/.travis-deps.sh
index 84bddb304..b8e8417b2 100644
--- a/.travis-deps.sh
+++ b/.travis-deps.sh
@@ -8,10 +8,16 @@ if [ "$TRAVIS_OS_NAME" = linux -o -z "$TRAVIS_OS_NAME" ]; then
8 sudo apt-get -qq update 8 sudo apt-get -qq update
9 sudo apt-get -qq install g++-4.8 xorg-dev libglu1-mesa-dev libxcursor-dev 9 sudo apt-get -qq install g++-4.8 xorg-dev libglu1-mesa-dev libxcursor-dev
10 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 90 10 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 90
11 git clone https://github.com/glfw/glfw.git 11 (
12 mkdir glfw/build && cd glfw/build 12 git clone https://github.com/glfw/glfw.git --branch 3.0.4 --depth 1
13 cmake .. && make && sudo make install 13 mkdir glfw/build && cd glfw/build
14 cd - 14 cmake .. && make -j2 && sudo make install
15 )
16
17 sudo apt-get install lib32stdc++6
18 sudo mkdir -p /usr/local
19 curl http://www.cmake.org/files/v2.8/cmake-2.8.11-Linux-i386.tar.gz \
20 | sudo tar -xz -C /usr/local --strip-components=1
15elif [ "$TRAVIS_OS_NAME" = osx ]; then 21elif [ "$TRAVIS_OS_NAME" = osx ]; then
16 brew tap homebrew/versions 22 brew tap homebrew/versions
17 brew install qt5 glfw3 pkgconfig 23 brew install qt5 glfw3 pkgconfig
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3461d1555..e1614cd4a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,78 +1,131 @@
1cmake_minimum_required(VERSION 2.8.7) 1# CMake 2.8.11 required for Qt5 settings to be applied automatically on
2# dependent libraries.
3cmake_minimum_required(VERSION 2.8.11)
2 4
3project(citra) 5project(citra)
4 6
5SET(CXX_COMPILE_FLAGS "-std=c++11") 7if (NOT MSVC)
6 8 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-attributes")
7# silence some spam 9else()
8add_definitions(-Wno-attributes) 10 # Silence deprecation warnings
11 add_definitions(/D_CRT_SECURE_NO_WARNINGS)
12endif()
9add_definitions(-DSINGLETHREADED) 13add_definitions(-DSINGLETHREADED)
10add_definitions(${CXX_COMPILE_FLAGS})
11 14
12find_package(PNG) 15find_package(PNG)
13if (PNG_FOUND) 16if (PNG_FOUND)
14 add_definitions(-DHAVE_PNG) 17 add_definitions(-DHAVE_PNG)
15endif () 18endif ()
16 19
17# dependency checking 20# Include bundled CMake modules
18list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/externals/cmake-modules/") 21list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/externals/cmake-modules")
19set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/CMakeTests) 22
20include(FindX11 REQUIRED)
21find_package(PkgConfig REQUIRED)
22find_package(OpenGL REQUIRED) 23find_package(OpenGL REQUIRED)
23pkg_search_module(GLFW REQUIRED glfw3) 24include_directories(${OPENGL_INCLUDE_DIR})
25
26option(ENABLE_GLFW "Enable the GLFW frontend" ON)
27if (ENABLE_GLFW)
28 if (WIN32)
29 # Detect toolchain and platform
30 if (MSVC)
31 if (CMAKE_SIZEOF_VOID_P EQUAL 8)
32 set(TMP_ARCH "x64")
33 else()
34 set(TMP_ARCH "Win32")
35 endif()
36
37 if (MSVC11) # Visual C++ 2012
38 set(TMP_TOOLSET "v110")
39 elseif (MSVC12) # Visual C++ 2013
40 set(TMP_TOOLSET "v120")
41 else()
42 set(TMP_TOOLSET "UNSUPPORTED")
43 message(SEND_ERROR "We don't supply GLFW binaries for your version of MSVC, you might have to provide them yourself.")
44 endif()
45
46 set(TMP_TOOLSET "msvc_${TMP_TOOLSET}-${TMP_ARCH}")
47 else()
48 # Assume mingw
49 if (CMAKE_SIZEOF_VOID_P EQUAL 8)
50 set(TMP_ARCH "x86_64")
51 else()
52 set(TMP_ARCH "i686")
53 endif()
54
55 set(TMP_TOOLSET "mingw-${TMP_ARCH}")
56 endif()
57
58 set(GLFW_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/externals/glfw-3.0.4.bin")
59 set(GLFW_INCLUDE_DIRS "${GLFW_PREFIX}/include" CACHE PATH "Path to GLFW3 headers")
60 set(GLFW_LIBRARY_DIRS "${GLFW_PREFIX}/lib-${TMP_TOOLSET}" CACHE PATH "Path to GLFW3 libraries")
61
62 # Clean up after ourselves
63 unset(TMP_TOOLSET)
64 unset(TMP_ARCH)
65
66 set(GLFW_LIBRARIES glfw3)
67 else()
68 find_package(X11 REQUIRED)
69 find_package(PkgConfig REQUIRED)
70 pkg_search_module(GLFW REQUIRED glfw3)
71 endif()
72
73 include_directories(${GLFW_INCLUDE_DIRS})
74 link_directories(${GLFW_LIBRARY_DIRS})
75endif()
24 76
25# corefoundation is required only on OSX
26IF (APPLE) 77IF (APPLE)
78 # CoreFoundation is required only on OSX
27 FIND_LIBRARY(COREFOUNDATION_LIBRARY CoreFoundation) 79 FIND_LIBRARY(COREFOUNDATION_LIBRARY CoreFoundation)
28 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") 80 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
29 SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++") 81 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++")
30ENDIF (APPLE) 82ENDIF (APPLE)
31 83
32#external includes 84option(ENABLE_QT "Enable the Qt frontend" ON)
33include_directories(${GLFW_INCLUDE_DIRS}) 85option(CITRA_FORCE_QT4 "Use Qt4 even if Qt5 is available." OFF)
34include_directories(${OPENGL_INCLUDE_DIR}) 86if (ENABLE_QT)
87 # Set CMAKE_PREFIX_PATH if QTDIR is defined in the environment This allows CMake to
88 # automatically find the Qt packages on Windows
89 if (DEFINED ENV{QTDIR})
90 list(APPEND CMAKE_PREFIX_PATH "$ENV{QTDIR}")
91 endif()
35 92
36# workaround for GLFW linking on OSX 93 if (NOT CITRA_FORCE_QT4)
37link_directories(${GLFW_LIBRARY_DIRS}) 94 find_package(Qt5 COMPONENTS Widgets OpenGL)
38 95 set(CITRA_QT_LIBS Qt5::Widgets Qt5::OpenGL)
39option(DISABLE_QT "Disable Qt GUI" OFF)
40option(USE_QT5 "Use Qt5 when available" ON)
41if (NOT DISABLE_QT)
42 if(USE_QT5)
43 find_package(Qt5Gui)
44 find_package(Qt5Widgets)
45 find_package(Qt5OpenGL)
46 if(NOT Qt5Gui_FOUND OR NOT Qt5Widgets_FOUND OR NOT Qt5OpenGL_FOUND)
47 message("Qt5 libraries not found! Using Qt4 instead.")
48 set(USE_QT5 OFF)
49 endif()
50 endif() 96 endif()
51 if(NOT USE_QT5)
52 include(FindQt4)
53 find_package(Qt4 COMPONENTS QtCore QtGui QtOpenGL)
54 97
55 if(QT4_FOUND AND QT_QTCORE_FOUND AND QT_QTGUI_FOUND AND QT_QTOPENGL_FOUND) 98 if (CITRA_FORCE_QT4 OR NOT Qt5_FOUND)
56 include(${QT_USE_FILE}) 99 # Try to fallback to Qt4
57 include_directories(${QT_INCLUDES}) 100 find_package(Qt4 REQUIRED COMPONENTS QtGui QtOpenGL)
58 else() 101 set(CITRA_QT_LIBS Qt4::QtGui Qt4::QtOpenGL)
59 message("Qt4 libraries not found! Disabling Qt GUI")
60 set(DISABLE_QT ON)
61 endif()
62 endif() 102 endif()
63endif() 103endif()
64 104
105# This function should be passed a list of all files in a target. It will automatically generate
106# file groups following the directory hierarchy, so that the layout of the files in IDEs matches the
107# one in the filesystem.
108function(create_directory_groups)
109 # Place any files that aren't in the source list in a separate group so that they don't get in
110 # the way.
111 source_group("Other Files" REGULAR_EXPRESSION ".")
112
113 foreach(file_name ${ARGV})
114 get_filename_component(dir_name "${file_name}" PATH)
115 # Group names use '\' as a separator even though the entire rest of CMake uses '/'...
116 string(REPLACE "/" "\\" group_name "${dir_name}")
117 source_group("${group_name}" FILES "${file_name}")
118 endforeach()
119endfunction()
120
65# generate git revision information 121# generate git revision information
66include(GetGitRevisionDescription) 122include(GetGitRevisionDescription)
67get_git_head_revision(GIT_REF_SPEC GIT_REV) 123get_git_head_revision(GIT_REF_SPEC GIT_REV)
68git_describe(GIT_DESC --always --long --dirty) 124git_describe(GIT_DESC --always --long --dirty)
69git_branch_name(GIT_BRANCH) 125git_branch_name(GIT_BRANCH)
70
71# internal includes
72include_directories(src)
73 126
74# process subdirectories 127# process subdirectories
75if(NOT DISABLE_QT) 128if(ENABLE_QT)
76 include_directories(externals/qhexedit) 129 include_directories(externals/qhexedit)
77 add_subdirectory(externals/qhexedit) 130 add_subdirectory(externals/qhexedit)
78endif() 131endif()
diff --git a/externals/qhexedit/CMakeLists.txt b/externals/qhexedit/CMakeLists.txt
index b1f631f95..e7470dfe4 100644
--- a/externals/qhexedit/CMakeLists.txt
+++ b/externals/qhexedit/CMakeLists.txt
@@ -5,14 +5,17 @@ set(SRCS
5 commands.cpp 5 commands.cpp
6 qhexedit.cpp 6 qhexedit.cpp
7 qhexedit_p.cpp 7 qhexedit_p.cpp
8 xbytearray.cpp) 8 xbytearray.cpp
9 )
9 10
10set(HEADERS 11set(HEADERS
12 commands.h
11 qhexedit.h 13 qhexedit.h
12 qhexedit_p.h) 14 qhexedit_p.h
15 xbytearray.h
16 )
13 17
14add_library(qhexedit STATIC ${SRCS} ${HEADERS}) 18create_directory_groups(${SRCS} ${HEADERS})
15if(USE_QT5)
16 target_link_libraries(qhexedit Qt5::Core Qt5::Widgets)
17endif()
18 19
20add_library(qhexedit STATIC ${SRCS} ${HEADERS})
21target_link_libraries(qhexedit ${CITRA_QT_LIBS})
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e0227dc53..cb09f3cd1 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,9 +1,12 @@
1# Enable modules to include each other's files
2include_directories(.)
3
1add_subdirectory(common) 4add_subdirectory(common)
2add_subdirectory(core) 5add_subdirectory(core)
3add_subdirectory(video_core) 6add_subdirectory(video_core)
4add_subdirectory(citra) 7if (ENABLE_GLFW)
5add_subdirectory(citra_qt) 8 add_subdirectory(citra)
6 9endif()
7if(QT4_FOUND AND QT_QTCORE_FOUND AND QT_QTGUI_FOUND AND QT_QTOPENGL_FOUND AND NOT DISABLE_QT4) 10if (ENABLE_QT)
8 #add_subdirectory(citra_qt) 11 add_subdirectory(citra_qt)
9endif() 12endif()
diff --git a/src/citra/CMakeLists.txt b/src/citra/CMakeLists.txt
index bd6c4a1a8..f10f3e603 100644
--- a/src/citra/CMakeLists.txt
+++ b/src/citra/CMakeLists.txt
@@ -1,6 +1,13 @@
1set(SRCS citra.cpp 1set(SRCS
2 emu_window/emu_window_glfw.cpp) 2 emu_window/emu_window_glfw.cpp
3set(HEADERS resource.h) 3 citra.cpp
4 )
5set(HEADERS
6 emu_window/emu_window_glfw.h
7 resource.h
8 )
9
10create_directory_groups(${SRCS} ${HEADERS})
4 11
5# NOTE: This is a workaround for CMake bug 0006976 (missing X11_xf86vmode_LIB variable) 12# NOTE: This is a workaround for CMake bug 0006976 (missing X11_xf86vmode_LIB variable)
6if (NOT X11_xf86vmode_LIB) 13if (NOT X11_xf86vmode_LIB)
@@ -8,11 +15,16 @@ if (NOT X11_xf86vmode_LIB)
8endif() 15endif()
9 16
10add_executable(citra ${SRCS} ${HEADERS}) 17add_executable(citra ${SRCS} ${HEADERS})
18target_link_libraries(citra core common video_core)
19target_link_libraries(citra ${OPENGL_gl_LIBRARY} ${GLFW_LIBRARIES})
11 20
12if (APPLE) 21if (APPLE)
13 target_link_libraries(citra core common video_core iconv pthread ${COREFOUNDATION_LIBRARY} ${OPENGL_LIBRARIES} ${GLFW_LIBRARIES}) 22 target_link_libraries(citra iconv pthread ${COREFOUNDATION_LIBRARY})
14else() 23elseif (WIN32)
15 target_link_libraries(citra core common video_core pthread X11 Xxf86vm Xi Xcursor ${OPENGL_LIBRARIES} ${GLFW_LIBRARIES} rt ${X11_Xrandr_LIB} ${X11_xv86vmode_LIB} ${PNG_LIBRARIES}) 24 target_link_libraries(citra winmm)
25else() # Unix
26 target_link_libraries(citra pthread rt)
27 target_link_libraries(citra ${X11_X11_LIB} ${X11_Xi_LIB} ${X11_Xcursor_LIB} ${X11_Xrandr_LIB} ${X11_xv86vmode_LIB})
16endif() 28endif()
17 29
18#install(TARGETS citra RUNTIME DESTINATION ${bindir}) 30#install(TARGETS citra RUNTIME DESTINATION ${bindir})
diff --git a/src/citra_qt/CMakeLists.txt b/src/citra_qt/CMakeLists.txt
index 055a585a0..426e4ef99 100644
--- a/src/citra_qt/CMakeLists.txt
+++ b/src/citra_qt/CMakeLists.txt
@@ -2,54 +2,61 @@ set(CMAKE_AUTOMOC ON)
2set(CMAKE_INCLUDE_CURRENT_DIR ON) 2set(CMAKE_INCLUDE_CURRENT_DIR ON)
3 3
4set(SRCS 4set(SRCS
5 bootmanager.cpp 5 config/controller_config.cpp
6 config/controller_config_util.cpp
6 debugger/callstack.cpp 7 debugger/callstack.cpp
7 debugger/disassembler.cpp 8 debugger/disassembler.cpp
8 debugger/graphics.cpp 9 debugger/graphics.cpp
9 debugger/graphics_cmdlists.cpp 10 debugger/graphics_cmdlists.cpp
10 debugger/ramview.cpp 11 debugger/ramview.cpp
11 debugger/registers.cpp 12 debugger/registers.cpp
13 bootmanager.cpp
12 hotkeys.cpp 14 hotkeys.cpp
13 main.cpp 15 main.cpp
14 config/controller_config.cpp 16 )
15 config/controller_config_util.cpp)
16 17
17set(HEADERS 18set(HEADERS
18 bootmanager.hxx 19 config/controller_config.hxx
20 config/controller_config_util.hxx
19 debugger/callstack.hxx 21 debugger/callstack.hxx
20 debugger/disassembler.hxx 22 debugger/disassembler.hxx
23 debugger/graphics.hxx
24 debugger/graphics_cmdlists.hxx
21 debugger/ramview.hxx 25 debugger/ramview.hxx
22 debugger/registers.hxx 26 debugger/registers.hxx
27 bootmanager.hxx
23 hotkeys.hxx 28 hotkeys.hxx
24 main.hxx 29 main.hxx
25 version.h 30 version.h
26 config/controller_config.hxx 31 )
27 config/controller_config_util.hxx)
28 32
29set(UIS 33set(UIS
34 config/controller_config.ui
30 debugger/callstack.ui 35 debugger/callstack.ui
31 debugger/disassembler.ui 36 debugger/disassembler.ui
32 debugger/registers.ui 37 debugger/registers.ui
33 hotkeys.ui 38 hotkeys.ui
34 main.ui 39 main.ui
35 config/controller_config.ui) 40 )
41
42create_directory_groups(${SRCS} ${HEADERS} ${UIS})
36 43
37if(USE_QT5) 44if (Qt5_FOUND)
38 qt5_wrap_ui(UI_HDRS ${UIS}) 45 qt5_wrap_ui(UI_HDRS ${UIS})
39else() 46else()
40 qt4_wrap_ui(UI_HDRS ${UIS}) 47 qt4_wrap_ui(UI_HDRS ${UIS})
41endif() 48endif()
42 49
43add_executable(citra-qt ${SRCS} ${HEADERS} ${UI_HDRS}) 50add_executable(citra-qt ${SRCS} ${HEADERS} ${UI_HDRS})
44if(APPLE) 51target_link_libraries(citra-qt core common video_core qhexedit)
45 set(ICONV_LIBRARY iconv) 52target_link_libraries(citra-qt ${OPENGL_gl_LIBRARY} ${CITRA_QT_LIBS})
46else()
47 set(RT_LIBRARY rt)
48endif()
49 53
50target_link_libraries(citra-qt core common video_core qhexedit ${ICONV_LIBRARY} ${COREFOUNDATION_LIBRARY} ${QT_LIBRARIES} ${OPENGL_LIBRARIES} ${RT_LIBRARY} ${PNG_LIBRARIES}) 54if (APPLE)
51if(USE_QT5) 55 target_link_libraries(citra-qt iconv ${COREFOUNDATION_LIBRARY})
52 target_link_libraries(citra-qt Qt5::Gui Qt5::Widgets Qt5::OpenGL) 56elseif (WIN32)
57 target_link_libraries(citra-qt winmm)
58else() # Unix
59 target_link_libraries(citra-qt rt)
53endif() 60endif()
54 61
55#install(TARGETS citra-qt RUNTIME DESTINATION ${bindir}) 62#install(TARGETS citra-qt RUNTIME DESTINATION ${bindir})
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index aae183393..f8a55c2a7 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -1,6 +1,8 @@
1# Generate cpp with Git revision from template
1configure_file("${CMAKE_CURRENT_SOURCE_DIR}/scm_rev.cpp.in" "${CMAKE_CURRENT_SOURCE_DIR}/scm_rev.cpp" @ONLY) 2configure_file("${CMAKE_CURRENT_SOURCE_DIR}/scm_rev.cpp.in" "${CMAKE_CURRENT_SOURCE_DIR}/scm_rev.cpp" @ONLY)
2 3
3set(SRCS break_points.cpp 4set(SRCS
5 break_points.cpp
4 console_listener.cpp 6 console_listener.cpp
5 extended_trace.cpp 7 extended_trace.cpp
6 file_search.cpp 8 file_search.cpp
@@ -12,23 +14,25 @@ set(SRCS break_points.cpp
12 memory_util.cpp 14 memory_util.cpp
13 misc.cpp 15 misc.cpp
14 msg_handler.cpp 16 msg_handler.cpp
15 string_util.cpp
16 scm_rev.cpp 17 scm_rev.cpp
18 string_util.cpp
17 symbols.cpp 19 symbols.cpp
18 thread.cpp 20 thread.cpp
19 timer.cpp 21 timer.cpp
20 utf8.cpp) 22 utf8.cpp
23 )
21 24
22set(HEADERS atomic.h 25set(HEADERS
26 atomic.h
23 atomic_gcc.h 27 atomic_gcc.h
24 atomic_win32.h 28 atomic_win32.h
25 bit_field.h 29 bit_field.h
26 break_points.h 30 break_points.h
27 chunk_file.h 31 chunk_file.h
32 common.h
28 common_funcs.h 33 common_funcs.h
29 common_paths.h 34 common_paths.h
30 common_types.h 35 common_types.h
31 common.h
32 console_listener.h 36 console_listener.h
33 cpu_detect.h 37 cpu_detect.h
34 debug_interface.h 38 debug_interface.h
@@ -37,10 +41,11 @@ set(HEADERS atomic.h
37 fifo_queue.h 41 fifo_queue.h
38 file_search.h 42 file_search.h
39 file_util.h 43 file_util.h
44 fixed_size_queue.h
40 hash.h 45 hash.h
41 linear_disk_cache.h 46 linear_disk_cache.h
42 log_manager.h
43 log.h 47 log.h
48 log_manager.h
44 math_util.h 49 math_util.h
45 mem_arena.h 50 mem_arena.h
46 memory_util.h 51 memory_util.h
@@ -54,8 +59,12 @@ set(HEADERS atomic.h
54 swap.h 59 swap.h
55 symbols.h 60 symbols.h
56 thread.h 61 thread.h
62 thread_queue_list.h
57 thunk.h 63 thunk.h
58 timer.h 64 timer.h
59 utf8.h) 65 utf8.h
66 )
67
68create_directory_groups(${SRCS} ${HEADERS})
60 69
61add_library(common STATIC ${SRCS} ${HEADERS}) 70add_library(common STATIC ${SRCS} ${HEADERS})
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 207f39707..1f358ec8d 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -1,14 +1,18 @@
1set(SRCS core.cpp 1set(SRCS
2 core_timing.cpp
3 loader/elf.cpp
4 loader/loader.cpp
5 loader/ncch.cpp
6 mem_map.cpp
7 mem_map_funcs.cpp
8 system.cpp
9 arm/disassembler/arm_disasm.cpp 2 arm/disassembler/arm_disasm.cpp
10 arm/disassembler/load_symbol_map.cpp 3 arm/disassembler/load_symbol_map.cpp
11 file_sys/archive_romfs.cpp 4 arm/interpreter/mmu/arm1176jzf_s_mmu.cpp
5 arm/interpreter/mmu/cache.cpp
6 arm/interpreter/mmu/maverick.cpp
7 arm/interpreter/mmu/rb.cpp
8 arm/interpreter/mmu/sa_mmu.cpp
9 arm/interpreter/mmu/tlb.cpp
10 arm/interpreter/mmu/wb.cpp
11 arm/interpreter/mmu/xscale_copro.cpp
12 arm/interpreter/vfp/vfp.cpp
13 arm/interpreter/vfp/vfpdouble.cpp
14 arm/interpreter/vfp/vfpinstr.cpp
15 arm/interpreter/vfp/vfpsingle.cpp
12 arm/interpreter/arm_interpreter.cpp 16 arm/interpreter/arm_interpreter.cpp
13 arm/interpreter/armcopro.cpp 17 arm/interpreter/armcopro.cpp
14 arm/interpreter/armemu.cpp 18 arm/interpreter/armemu.cpp
@@ -18,22 +22,7 @@ set(SRCS core.cpp
18 arm/interpreter/armsupp.cpp 22 arm/interpreter/armsupp.cpp
19 arm/interpreter/armvirt.cpp 23 arm/interpreter/armvirt.cpp
20 arm/interpreter/thumbemu.cpp 24 arm/interpreter/thumbemu.cpp
21 arm/interpreter/vfp/vfp.cpp 25 file_sys/archive_romfs.cpp
22 arm/interpreter/vfp/vfpdouble.cpp
23 arm/interpreter/vfp/vfpinstr.cpp
24 arm/interpreter/vfp/vfpsingle.cpp
25 arm/interpreter/mmu/arm1176jzf_s_mmu.cpp
26 arm/interpreter/mmu/cache.cpp
27 arm/interpreter/mmu/maverick.cpp
28 arm/interpreter/mmu/rb.cpp
29 arm/interpreter/mmu/sa_mmu.cpp
30 arm/interpreter/mmu/tlb.cpp
31 arm/interpreter/mmu/wb.cpp
32 arm/interpreter/mmu/xscale_copro.cpp
33 hle/hle.cpp
34 hle/config_mem.cpp
35 hle/coprocessor.cpp
36 hle/svc.cpp
37 hle/kernel/address_arbiter.cpp 26 hle/kernel/address_arbiter.cpp
38 hle/kernel/archive.cpp 27 hle/kernel/archive.cpp
39 hle/kernel/event.cpp 28 hle/kernel/event.cpp
@@ -48,27 +37,26 @@ set(SRCS core.cpp
48 hle/service/ndm.cpp 37 hle/service/ndm.cpp
49 hle/service/service.cpp 38 hle/service/service.cpp
50 hle/service/srv.cpp 39 hle/service/srv.cpp
40 hle/config_mem.cpp
41 hle/coprocessor.cpp
42 hle/hle.cpp
43 hle/svc.cpp
51 hw/gpu.cpp 44 hw/gpu.cpp
52 hw/hw.cpp 45 hw/hw.cpp
53 hw/ndma.cpp) 46 hw/ndma.cpp
47 loader/elf.cpp
48 loader/loader.cpp
49 loader/ncch.cpp
50 core.cpp
51 core_timing.cpp
52 mem_map.cpp
53 mem_map_funcs.cpp
54 system.cpp
55 )
54 56
55set(HEADERS core.h 57set(HEADERS
56 core_timing.h
57 loader/elf.h
58 loader/loader.h
59 loader/ncch.h
60 mem_map.h
61 system.h
62 arm/disassembler/arm_disasm.h 58 arm/disassembler/arm_disasm.h
63 arm/disassembler/load_symbol_map.h 59 arm/disassembler/load_symbol_map.h
64 arm/interpreter/arm_interpreter.h
65 arm/interpreter/arm_regformat.h
66 arm/interpreter/armcpu.h
67 arm/interpreter/armdefs.h
68 arm/interpreter/armemu.h
69 arm/interpreter/armmmu.h
70 arm/interpreter/armos.h
71 arm/interpreter/skyeye_defs.h
72 arm/interpreter/mmu/arm1176jzf_s_mmu.h 60 arm/interpreter/mmu/arm1176jzf_s_mmu.h
73 arm/interpreter/mmu/cache.h 61 arm/interpreter/mmu/cache.h
74 arm/interpreter/mmu/rb.h 62 arm/interpreter/mmu/rb.h
@@ -78,27 +66,48 @@ set(HEADERS core.h
78 arm/interpreter/vfp/asm_vfp.h 66 arm/interpreter/vfp/asm_vfp.h
79 arm/interpreter/vfp/vfp.h 67 arm/interpreter/vfp/vfp.h
80 arm/interpreter/vfp/vfp_helper.h 68 arm/interpreter/vfp/vfp_helper.h
69 arm/interpreter/arm_interpreter.h
70 arm/interpreter/arm_regformat.h
71 arm/interpreter/armcpu.h
72 arm/interpreter/armdefs.h
73 arm/interpreter/armemu.h
74 arm/interpreter/armmmu.h
75 arm/interpreter/armos.h
76 arm/interpreter/skyeye_defs.h
77 arm/arm_interface.h
81 file_sys/archive.h 78 file_sys/archive.h
82 file_sys/archive_romfs.h 79 file_sys/archive_romfs.h
83 hle/config_mem.h
84 hle/coprocessor.h
85 hle/hle.h
86 hle/svc.h
87 hle/kernel/address_arbiter.h 80 hle/kernel/address_arbiter.h
88 hle/kernel/archive.h 81 hle/kernel/archive.h
82 hle/kernel/event.h
89 hle/kernel/kernel.h 83 hle/kernel/kernel.h
90 hle/kernel/mutex.h 84 hle/kernel/mutex.h
91 hle/kernel/shared_memory.h 85 hle/kernel/shared_memory.h
92 hle/kernel/thread.h 86 hle/kernel/thread.h
93 hle/function_wrappers.h
94 hle/service/apt.h 87 hle/service/apt.h
95 hle/service/fs.h 88 hle/service/fs.h
96 hle/service/gsp.h 89 hle/service/gsp.h
97 hle/service/hid.h 90 hle/service/hid.h
91 hle/service/ndm.h
98 hle/service/service.h 92 hle/service/service.h
99 hle/service/srv.h 93 hle/service/srv.h
94 hle/config_mem.h
95 hle/coprocessor.h
96 hle/function_wrappers.h
97 hle/hle.h
98 hle/svc.h
100 hw/gpu.h 99 hw/gpu.h
101 hw/hw.h 100 hw/hw.h
102 hw/ndma.h) 101 hw/ndma.h
102 loader/elf.h
103 loader/loader.h
104 loader/ncch.h
105 core.h
106 core_timing.h
107 mem_map.h
108 system.h
109 )
110
111create_directory_groups(${SRCS} ${HEADERS})
103 112
104add_library(core STATIC ${SRCS} ${HEADERS}) 113add_library(core STATIC ${SRCS} ${HEADERS})
diff --git a/src/video_core/CMakeLists.txt b/src/video_core/CMakeLists.txt
index 48c5d1424..13c3f7b22 100644
--- a/src/video_core/CMakeLists.txt
+++ b/src/video_core/CMakeLists.txt
@@ -1,29 +1,42 @@
1set(SRCS clipper.cpp 1set(SRCS
2 renderer_opengl/generated/gl_3_2_core.c
3 renderer_opengl/renderer_opengl.cpp
4 renderer_opengl/gl_shader_util.cpp
5 debug_utils/debug_utils.cpp
6 clipper.cpp
2 command_processor.cpp 7 command_processor.cpp
3 primitive_assembly.cpp 8 primitive_assembly.cpp
4 rasterizer.cpp 9 rasterizer.cpp
5 utils.cpp 10 utils.cpp
6 vertex_shader.cpp 11 vertex_shader.cpp
7 video_core.cpp 12 video_core.cpp
8 renderer_opengl/generated/gl_3_2_core.c 13 )
9 renderer_opengl/renderer_opengl.cpp
10 renderer_opengl/gl_shader_util.cpp
11 debug_utils/debug_utils.cpp)
12 14
13set(HEADERS clipper.h 15set(HEADERS
16 debug_utils/debug_utils.h
17 renderer_opengl/generated/gl_3_2_core.h
18 renderer_opengl/gl_shader_util.h
19 renderer_opengl/gl_shaders.h
20 renderer_opengl/renderer_opengl.h
21 clipper.h
14 command_processor.h 22 command_processor.h
23 gpu_debugger.h
15 math.h 24 math.h
25 pica.h
16 primitive_assembly.h 26 primitive_assembly.h
17 rasterizer.h 27 rasterizer.h
18 utils.h
19 video_core.h
20 renderer_base.h 28 renderer_base.h
29 utils.h
21 vertex_shader.h 30 vertex_shader.h
22 video_core.h 31 video_core.h
23 renderer_opengl/generated/gl_3_2_core.h 32 )
24 renderer_opengl/renderer_opengl.h 33
25 renderer_opengl/gl_shader_util.h 34create_directory_groups(${SRCS} ${HEADERS})
26 renderer_opengl/gl_shaders.h
27 debug_utils/debug_utils.h)
28 35
29add_library(video_core STATIC ${SRCS} ${HEADERS}) 36add_library(video_core STATIC ${SRCS} ${HEADERS})
37
38if (PNG_FOUND)
39 target_link_libraries(video_core ${PNG_LIBRARIES})
40 include_directories(${PNG_INCLUDE_DIRS})
41 add_definitions(${PNG_DEFINITIONS})
42endif()