summaryrefslogtreecommitdiffstats
path: root/soundserver/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'soundserver/CMakeLists.txt')
-rw-r--r--soundserver/CMakeLists.txt200
1 files changed, 200 insertions, 0 deletions
diff --git a/soundserver/CMakeLists.txt b/soundserver/CMakeLists.txt
new file mode 100644
index 0000000..ee4f689
--- /dev/null
+++ b/soundserver/CMakeLists.txt
@@ -0,0 +1,200 @@
+#################################################
+#
+# (C) 2010 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+set( FLOWLIBS artsflow )
+
+configure_file( artsversion-new.h.in artsversion.h )
+
+set( MCOPINC
+ -I${CMAKE_CURRENT_SOURCE_DIR} # for kmedia2.idl
+ -I${CMAKE_SOURCE_DIR}/mcop
+ -I${CMAKE_SOURCE_DIR}/flow
+)
+
+include_directories(
+ ${CMAKE_CURRENT_BINARY_DIR} # for artsversion.h
+ ${CMAKE_BINARY_DIR} # for config.h
+ ${CMAKE_BINARY_DIR}/flow # for artsflow.h
+ ${CMAKE_SOURCE_DIR}/flow # for stdsynthmodule.h
+ ${CMAKE_BINARY_DIR}/mcop # for arts_export.h
+ ${CMAKE_SOURCE_DIR}/mcop # for common.h
+)
+
+set( soundserver_INCS
+ ${CMAKE_CURRENT_BINARY_DIR}/artsversion.h
+ ${CMAKE_CURRENT_BINARY_DIR}/soundserver.h
+ ${CMAKE_CURRENT_BINARY_DIR}/kmedia2.h
+ soundserver.idl
+ kmedia2.idl
+)
+
+
+##### libkmedia2_idl ###########################
+
+add_custom_command(
+ OUTPUT kmedia2.cc
+ COMMAND ../mcopidl/mcopidl ARGS -t ${MCOPINC} ${CMAKE_CURRENT_SOURCE_DIR}/kmedia2.idl
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/kmedia2.idl
+)
+
+set( kmedia2_idl_SRCS
+ kmedia2.cc
+)
+
+add_library( kmedia2_idl SHARED ${kmedia2_idl_SRCS} )
+set_target_properties( kmedia2_idl PROPERTIES VERSION 1.0 SOVERSION 1 )
+target_link_libraries( kmedia2_idl artsflow_idl )
+
+
+##### libsoundserver_idl ########################
+
+add_custom_command(
+ OUTPUT soundserver.cc
+ COMMAND ../mcopidl/mcopidl ARGS -t ${MCOPINC} ${CMAKE_CURRENT_SOURCE_DIR}/soundserver.idl
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/soundserver.idl
+)
+
+set( soundserver_idl_SRCS
+ soundserver.cc
+)
+
+add_library( soundserver_idl SHARED ${soundserver_idl_SRCS} )
+set_target_properties( soundserver_idl PROPERTIES VERSION 1.0 SOVERSION 1 )
+target_link_libraries( soundserver_idl kmedia2_idl artsflow_idl )
+
+
+##### libartsgslplayobject ######################
+
+set( artsgslplayobject_SRCS
+ gslplayobject_impl.cc
+)
+
+add_library( artsgslplayobject SHARED ${artsgslplayobject_SRCS} )
+set_target_properties( artsgslplayobject PROPERTIES VERSION 1.0 SOVERSION 1 )
+target_link_libraries( artsgslplayobject mcop soundserver_idl artsflow )
+
+
+##### libartswavplayobject ######################
+
+set( artswavplayobject_SRCS
+ wavplayobject_impl.cc
+)
+
+add_library( artswavplayobject SHARED ${artswavplayobject_SRCS} )
+set_target_properties( artswavplayobject PROPERTIES VERSION 1.0 SOVERSION 1 )
+target_link_libraries( artswavplayobject mcop soundserver_idl artsflow )
+
+
+##### libkmedia2 ################################
+
+set( kmedia2_SRCS
+ fileinputstream_impl.cc
+ stdoutwriter_impl.cc
+)
+
+add_library( kmedia2 SHARED ${kmedia2_SRCS} )
+set_target_properties( kmedia2 PROPERTIES VERSION 1.0 SOVERSION 1 )
+target_link_libraries( kmedia2 kmedia2_idl artsflow )
+
+
+##### artsd #####################################
+
+set( artsd_SRCS
+ soundserverv2_impl.cc
+ soundserver_impl.cc
+ simplesoundserver_impl.cc
+ artsd.cc
+ cpuusage.cc
+ samplestorage_impl.cc
+ crashhandler.cc
+ soundserverstartup_impl.cc
+)
+
+add_executable( artsd ${artsd_SRCS} )
+target_link_libraries( artsd soundserver_idl artsflow mcop_mt )
+
+
+##### artsplay ##################################
+
+set( artsplay_SRCS
+ artsplay.cc
+)
+
+add_executable( artsplay ${artsplay_SRCS} )
+target_link_libraries( artsplay soundserver_idl ${LIBPTHREAD} )
+
+
+##### artscat ###################################
+
+set( artscat_SRCS
+ artsrec.cc
+)
+
+set( CMAKE_EXE_LINKER_FLAGS ${USE_THREADS} )
+add_executable( artscat ${artscat_SRCS} )
+target_link_libraries( artscat soundserver_idl ${FLOWLIBS} ${LIBPTHREAD} )
+
+
+##### artswrapper ###############################
+
+set( artswrapper_SRCS
+ artswrapper.c
+)
+
+add_executable( artswrapper ${artswrapper_SRCS} )
+set_target_properties( artswrapper PROPERTIES COMPILE_FLAGS -DEXECUTE=\\"${artsdpath}\\" )
+target_link_libraries( artswrapper )
+
+
+##### artsshell #################################
+
+set( artsshell_SRCS
+ artsshell.cc
+ tradercheck.cc
+)
+
+add_executable( artsshell ${artsshell_SRCS} )
+target_link_libraries( artsshell soundserver_idl ${LIBPTHREAD} )
+
+
+
+##### artsrec ###################################
+
+set( artsrec_SRCS
+ artsrec.cc
+)
+
+add_executable( artsrec ${artsrec_SRCS} )
+target_link_libraries( artsrec soundserver_idl ${FLOWLIBS} ${LIBPTHREAD} )
+
+
+##### install ###################################
+
+install( FILES ${soundserver_INCS} DESTINATION ${INCLUDE_INSTALL_DIR} )
+
+install(TARGETS
+ kmedia2_idl
+ soundserver_idl
+ artsgslplayobject
+ artswavplayobject
+ kmedia2
+ LIBRARY DESTINATION ${LIB_INSTALL_DIR}
+)
+
+install( TARGETS
+ artsd
+ artsplay
+ artscat
+ artswrapper
+ artsshell
+ artsrec
+ DESTINATION ${BIN_INSTALL_DIR}
+) \ No newline at end of file