-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CMake build system. Add libvgm submodule required for cmake builds
- Loading branch information
Showing
4 changed files
with
65 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
cmake_minimum_required(VERSION 3.11) | ||
project(mmlgui LANGUAGES C CXX) | ||
|
||
find_package(PkgConfig REQUIRED) | ||
find_package(OpenGL REQUIRED) | ||
|
||
pkg_check_modules(GLFW3 REQUIRED glfw3) | ||
pkg_check_modules(CPPUNIT cppunit) | ||
|
||
add_subdirectory(ctrmml) | ||
add_subdirectory(libvgm) | ||
|
||
add_library(gui | ||
imgui/imgui.cpp | ||
imgui/imgui_demo.cpp | ||
imgui/imgui_draw.cpp | ||
imgui/imgui_widgets.cpp | ||
imgui/examples/imgui_impl_glfw.cpp | ||
imgui/examples/imgui_impl_opengl3.cpp | ||
imgui/examples/libs/gl3w/GL/gl3w.c | ||
imgui/addons/imguifilesystem/imguifilesystem.cpp | ||
ImGuiColorTextEdit/TextEditor.cpp) | ||
|
||
target_include_directories(gui PUBLIC | ||
imgui | ||
imgui/examples | ||
imgui/examples/libs/gl3w | ||
ImGuiColorTextEdit | ||
${GLFW3_INCLUDE_DIRS}) | ||
|
||
target_link_libraries(gui PUBLIC OpenGL::GL ${GLFW3_LIBRARIES}) | ||
target_compile_definitions(gui PUBLIC -DIMGUI_IMPL_OPENGL_LOADER_GL3W) | ||
|
||
add_executable(mmlgui | ||
src/main.cpp | ||
src/window.cpp | ||
src/main_window.cpp | ||
src/editor_window.cpp | ||
src/song_manager.cpp | ||
src/track_info.cpp | ||
src/track_view_window.cpp | ||
src/track_list_window.cpp | ||
src/audio_manager.cpp | ||
src/emu_player.cpp | ||
src/config_window.cpp | ||
src/dmf_importer.cpp | ||
src/miniz.c) | ||
|
||
target_link_libraries(mmlgui PRIVATE ctrmml gui vgm-utils vgm-audio vgm-emu) | ||
|
||
if(CPPUNIT_FOUND) | ||
add_executable(mmlgui_unittest | ||
src/track_info.cpp | ||
src/unittest/test_track_info.cpp | ||
src/unittest/main.cpp) | ||
target_link_libraries(mmlgui_unittest ctrmml) | ||
target_link_libraries(mmlgui_unittest ${CPPUNIT_LIBRARIES}) | ||
enable_testing() | ||
add_test(NAME run_mmlgui_unittest COMMAND mmlgui_unittest WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) | ||
endif() |
Submodule ctrmml
updated
11 files
+49 −0 | CMakeLists.txt | |
+7 −1 | Makefile | |
+1 −0 | sample/junkers_high.mml | |
+28 −5 | src/mmlc.cpp | |
+531 −0 | src/optimizer.cpp | |
+90 −0 | src/optimizer.h | |
+12 −11 | src/platform/mdsdrv.cpp | |
+3 −2 | src/platform/mdsdrv.h | |
+1 −1 | src/player.cpp | |
+9 −8 | src/track.cpp | |
+2 −1 | src/track.h |