Skip to content

Commit

Permalink
Build system added: cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrolcl committed Apr 10, 2016
1 parent 6d91105 commit 7691d33
Show file tree
Hide file tree
Showing 7 changed files with 175 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@

# QtCreator
*.user

build/
12 changes: 12 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
cmake_minimum_required(VERSION 3.0)
project(eassynth)

find_package(Qt5Core REQUIRED)
find_package(PkgConfig REQUIRED)

set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DQT_NO_DEBUG_OUTPUT")

add_subdirectory(sonivox)
add_subdirectory(libsvoxeas)
add_subdirectory(cmdlnsynth)
add_subdirectory(guisynth)
9 changes: 9 additions & 0 deletions cmdlnsynth/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
add_executable( cmdlnsynth main.cpp )

target_link_libraries( cmdlnsynth
Qt5::Core
svoxeas
)

install( TARGETS cmdlnsynth
DESTINATION bin )
30 changes: 30 additions & 0 deletions guisynth/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
set(CMAKE_INCLUDE_CURRENT_DIR ON)
find_package(Qt5Widgets REQUIRED)

set( SOURCES
main.cpp
mainwindow.cpp
)

set( HEADERS mainwindow.h )
set( FORMS mainwindow.ui )
set( RESOURCES guisynth.qrc )

qt5_wrap_cpp ( MOC_SRCS ${HEADERS} )
qt5_wrap_ui ( UI_SRCS ${FORMS} )
qt5_add_resources ( RES_SRCS ${RESOURCES} )

add_executable( guisynth
${SOURCES}
${MOC_SRCS}
${UI_SRCS}
${RES_SRCS}
)

target_link_libraries( guisynth
Qt5::Widgets
svoxeas
)

install( TARGETS guisynth
DESTINATION bin )
46 changes: 46 additions & 0 deletions libsvoxeas/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
pkg_check_modules(PULSE REQUIRED libpulse-simple)
pkg_check_modules(DRUMSTICK REQUIRED drumstick-alsa)

link_directories(
${PULSE_LIBRARY_DIRS}
${DRUMSTICK_LIBRARY_DIRS}
)

set( HEADERS
synthcontroller.h
synthrenderer.h
)

set( SOURCES
synthcontroller.cpp
synthrenderer.cpp
)

qt5_wrap_cpp( MOC_SRCS ${HEADERS} )

add_library( svoxeas SHARED ${MOC_SRCS} ${SOURCES} )

set_target_properties( svoxeas PROPERTIES
VERSION 1.0.0
SOVERSION 1
)

target_link_libraries( svoxeas
sonivox
Qt5::Core
${PULSE_LIBRARIES}
${DRUMSTICK_LIBRARIES}
)

target_include_directories( svoxeas
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
PRIVATE
${PULSE_INCLUDE_DIRS}
${DRUMSTICK_INCLUDE_DIRS}
)

install(
TARGETS svoxeas
DESTINATION lib${LIB_SUFFIX}
)
1 change: 1 addition & 0 deletions libsvoxeas/libsvoxeas.pro
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ QT += core
QT -= gui
TEMPLATE = lib
TARGET = svoxeas
CONFIG(release): DEFINES += QT_NO_DEBUG_OUTPUT

DEPENDPATH += ../sonivox
INCLUDEPATH += ../sonivox/host_src
Expand Down
75 changes: 75 additions & 0 deletions sonivox/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
add_definitions(
-DUNIFIED_DEBUG_MESSAGES
-DEAS_WT_SYNTH
#_IMELODY_PARSER
#_RTTTL_PARSER
#_OTA_PARSER
#_XMF_PARSER
-DNUM_OUTPUT_CHANNELS=2
-D_SAMPLE_RATE_22050
-DMAX_SYNTH_VOICES=64
-D_8_BIT_SAMPLES
-D_FILTER_ENABLED
-DDLS_SYNTHESIZER
-D_REVERB_ENABLED
-D_CHORUS_ENABLED
)

set( SOURCES
host_src/eas_config.c
host_src/eas_hostmm.c
#host_src/eas_main.c
host_src/eas_report.c
host_src/eas_wave.c
lib_src/eas_chorus.c
lib_src/eas_chorusdata.c
lib_src/eas_data.c
lib_src/eas_dlssynth.c
lib_src/eas_flog.c
#lib_src/eas_ima_tables.c
#lib_src/eas_imaadpcm.c
#lib_src/eas_imelody.c
#lib_src/eas_imelodydata.c
lib_src/eas_math.c
lib_src/eas_mdls.c
lib_src/eas_midi.c
lib_src/eas_mididata.c
lib_src/eas_mixbuf.c
lib_src/eas_mixer.c
#lib_src/eas_ota.c
#lib_src/eas_otadata.c
lib_src/eas_pan.c
lib_src/eas_pcm.c
lib_src/eas_pcmdata.c
lib_src/eas_public.c
lib_src/eas_reverb.c
lib_src/eas_reverbdata.c
#lib_src/eas_rtttl.c
#lib_src/eas_rtttldata.c
lib_src/eas_smf.c
lib_src/eas_smfdata.c
lib_src/eas_tcdata.c
lib_src/eas_tonecontrol.c
lib_src/eas_voicemgt.c
#lib_src/eas_wavefile.c
#lib_src/eas_wavefiledata.c
lib_src/eas_wtengine.c
lib_src/eas_wtsynth.c
#lib_src/eas_xmf.c
#lib_src/eas_xmfdata.c
lib_src/jet.c
lib_src/wt_22khz.c
)

add_library( sonivox STATIC ${SOURCES} )

target_include_directories( sonivox
PUBLIC host_src
PRIVATE lib_src
)

set_target_properties( sonivox PROPERTIES
POSITION_INDEPENDENT_CODE true
VERSION 3.6.10
)

0 comments on commit 7691d33

Please sign in to comment.