aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorWohlstand <admin@wohlnet.ru>2017-11-09 22:50:32 +0300
committerWohlstand <admin@wohlnet.ru>2017-11-09 22:50:32 +0300
commit0be25a41ca793c3c03814f529890492adfac8ad5 (patch)
treea099d0025109b689bb0d6847e83b9890e34d5d35 /CMakeLists.txt
parent265ae7a37afb087b9e16f4ddd0eaef28a21826de (diff)
downloadlibADLMIDI-0be25a41ca793c3c03814f529890492adfac8ad5.tar.gz
libADLMIDI-0be25a41ca793c3c03814f529890492adfac8ad5.tar.bz2
libADLMIDI-0be25a41ca793c3c03814f529890492adfac8ad5.zip
Resolve weird crash caused by Tetris inside ADLMIDI2 and other changes
- Move most of inline classes methods into own CC file - Move Input into own header with own CC file to share it with the puzzle game - Created virtual destructors and resolved weak vtable trouble between of Tetris's classes - Remove static declarisons of Tetris class. Instead, let it be member of UserInterface - Fixed forgot note-offs while sorting events row with zero length notes - Fixed crash caused by unsafe access by reference to element of array that was modified/reallocated one or multiple times - Stabilize dealing with zero-length notes
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt24
1 files changed, 22 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3a7da2f..d1ae802 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -202,9 +202,29 @@ if(WITH_ADLMIDI2)
message("Found ${SDL2_LIBRARY}")
endif()
- add_executable(adlmidi2
+ if(NOT WIN32)
+ set(ADLMIDI2_HAS_PUZZLE_GAME "TRUE")
+ set(ADLMIDI2_VIDEO_OUT_SUPPORT "TRUE")
+ endif()
+
+ set(adlmidi2_src)
+ list(APPEND adlmidi2_src
${libADLMIDI_SOURCE_DIR}/utils/adlmidi-2/midiplay.cc
- )
+ ${libADLMIDI_SOURCE_DIR}/utils/adlmidi-2/input.cc)
+
+ if(ADLMIDI2_HAS_PUZZLE_GAME)
+ list(APPEND adlmidi2_src ${libADLMIDI_SOURCE_DIR}/utils/adlmidi-2/puzzlegame.cc)
+ endif()
+
+ add_executable(adlmidi2 ${adlmidi2_src})
+
+ if(ADLMIDI2_HAS_PUZZLE_GAME)
+ target_compile_options(adlmidi2 PUBLIC "-DSUPPORT_PUZZLE_GAME")
+ endif()
+
+ if(ADLMIDI2_VIDEO_OUT_SUPPORT)
+ target_compile_options(adlmidi2 PUBLIC "-DSUPPORT_VIDEO_OUTPUT")
+ endif()
if(WIN32)
target_link_libraries(adlmidi2 ADLMIDI winmm)