diff --git a/CMakeLists.txt b/CMakeLists.txt index 8873729..c026d0c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,11 @@ cmake_minimum_required( VERSION 2.6 ) +##### include our cmake modules ################# +set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" ) +include( TDEMacros ) + + ##### project settings ########################## project( arts ) diff --git a/artsc/CMakeLists.txt b/artsc/CMakeLists.txt index c8659c3..6240910 100644 --- a/artsc/CMakeLists.txt +++ b/artsc/CMakeLists.txt @@ -28,76 +28,73 @@ endforeach(INC) configure_file( artsc-config.in artsc-config @ONLY ) configure_file( artsc_export.h.in artsc_export.h @ONLY ) - -set( FLOWLIBS artsflow ) - -set( artsc_INCS - artsc.h - artsc_export.h -) +install( PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/artsc-config DESTINATION ${BIN_INSTALL_DIR} ) add_definitions( -DCOMPILING_ARTSC ) + +##### include paths ############################# + include_directories( - ${CMAKE_CURRENT_BINARY_DIR} # for artsc_export.h - ${CMAKE_BINARY_DIR}/mcop # for arts_export.h - ${CMAKE_SOURCE_DIR}/mcop # for common.h - ${CMAKE_BINARY_DIR}/flow # for artsflow.h - ${CMAKE_SOURCE_DIR}/flow # for stdsynthmodule.h - ${CMAKE_BINARY_DIR}/soundserver # for soundserver.h + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}/mcop + ${CMAKE_SOURCE_DIR}/mcop + ${CMAKE_BINARY_DIR}/flow + ${CMAKE_SOURCE_DIR}/flow + ${CMAKE_BINARY_DIR}/soundserver ) -##### libartsdsp ################################ -set( artsdsp_SRCS - artsdsp.c -) +##### headers ################################### -add_library( artsdsp SHARED ${artsdsp_SRCS} ) -set_target_properties( artsdsp PROPERTIES VERSION 0.0 SOVERSION 0 ) -target_link_libraries( artsdsp artsc ) +# FIXME these header must be installed? +#install( FILES +# artsc.h artsc_export.h +# DESTINATION ${INCLUDE_INSTALL_DIR} ) -##### libartsdsp_st ############################# +##### artsdsp (shared lib) ###################### -set( artsdsp_st_SRCS - artsc.c - artsdsp.c +tde_add_library( artsdsp SHARED + SOURCES artsdsp.c + VERSION 0.0.0 + LINK artsc-shared + DESTINATION ${LIB_INSTALL_DIR} ) -add_library( artsdsp_st SHARED ${artsdsp_st_SRCS} ) -set_target_properties( artsdsp_st PROPERTIES VERSION 0.0 SOVERSION 0 ) -set_target_properties( artsdsp_st PROPERTIES COMPILE_FLAGS -DARTSC_BACKEND=\\"$(libdir)/libartscbackend.la\\" ) -target_link_libraries( artsdsp_st ltdlc ) - -##### libartsc ################################## +##### artsdsp_st (shared lib) ################### -set( artsc_SRCS - artsc.c +tde_add_library( artsdsp_st SHARED + SOURCES artsc.c artsdsp.c + VERSION 0.0.0 + LINK ltdlc-static + DESTINATION ${LIB_INSTALL_DIR} ) -add_library( artsc SHARED ${artsc_SRCS} ) -set_target_properties( artsc PROPERTIES VERSION 0.0 SOVERSION 0 ) -set_target_properties( artsc PROPERTIES COMPILE_FLAGS -DARTSC_BACKEND=\\"$(libdir)/libartscbackend.la\\" ) -target_link_libraries( artsc ltdlc ${LIBPTHREAD} ) +set_target_properties( artsdsp_st-shared PROPERTIES COMPILE_FLAGS -DARTSC_BACKEND=\\"$(libdir)/libartscbackend.la\\" ) -##### libartscbackend ########################### +##### artsc (shared lib) ######################## -set( artscbackend_SRCS - artscbackend.cc +tde_add_library( artsc SHARED + SOURCES artsc.c + VERSION 0.0.0 + LINK ltdlc-static + DESTINATION ${LIB_INSTALL_DIR} ) -add_library( artscbackend SHARED ${artscbackend_SRCS} ) -set_target_properties( artscbackend PROPERTIES VERSION 0.0 SOVERSION 0 ) -target_link_libraries( artscbackend ${FLOWLIBS} soundserver_idl ) +set_target_properties( artsc-shared PROPERTIES COMPILE_FLAGS -DARTSC_BACKEND=\\"$(libdir)/libartscbackend.la\\" ) -##### install ################################### +##### artscbackend (shared lib) ################# -#install( FILES ${artsc_INCS} DESTINATION ${INCLUDE_INSTALL_DIR} ) -install( PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/artsc-config DESTINATION ${BIN_INSTALL_DIR} ) -install( TARGETS artsdsp artsdsp_st artsc artscbackend LIBRARY DESTINATION ${LIB_INSTALL_DIR} ) \ No newline at end of file +tde_add_library( artscbackend SHARED + SOURCES artscbackend.cc + VERSION 0.0.0 + LINK soundserver_idl-shared artsflow-shared + DESTINATION ${LIB_INSTALL_DIR} +) diff --git a/config.h.cmake b/config.h.cmake index e9822bf..ac9dddb 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -10,6 +10,7 @@ #cmakedefine HAVE_DLFCN_H 1 #cmakedefine HAVE_LIBDL 1 +#define LTDL_OBJDIR "." #cmakedefine HAVE_DLERROR 1 #cmakedefine HAVE_STRCMP 1 diff --git a/flow/CMakeLists.txt b/flow/CMakeLists.txt index 2f7325c..4231957 100644 --- a/flow/CMakeLists.txt +++ b/flow/CMakeLists.txt @@ -13,83 +13,55 @@ add_subdirectory( mcopclass ) add_subdirectory( gsl ) add_subdirectory( gslpp ) -set( artsflow_INCS - ${CMAKE_CURRENT_BINARY_DIR}/artsflow.h - audiosubsys.h - cache.h - cachedwav.h - convert.h - pipebuffer.h - stdsynthmodule.h - synthschedule.h - fft.h - artsflow.idl - audioio.h - resample.h - cpuinfo.h - bufferqueue.h - gslschedule.h +include_directories( + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}/mcop + ${CMAKE_SOURCE_DIR}/mcop + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${GLIB2_INCLUDE_DIRS} ) -set( artsflow_SRCS - synth_play_impl.cc - gslschedule.cc - audiosubsys.cc - pipebuffer.cc - convert.cc - synth_wave_sin_impl.cc - synth_frequency_impl.cc - synth_multi_add_impl.cc - synth_add_impl.cc - synth_mul_impl.cc - synth_play_wav_impl.cc - stdsynthmodule.cc - cache.cc - asyncschedule.cc - bytestreamtoaudio_impl.cc - stereovolumecontrol_impl.cc - stereoeffectstack_impl.cc - fft.c - stereofftscope_impl.cc - virtualports.cc - bus.cc - audiomanager_impl.cc - synth_record_impl.cc - resample.cc - audioio.cc - audioiooss.cc - audioioalsa.cc - audioioalsa9.cc - audioionull.cc - audioiolibaudioio.cc - audioioesd.cc - audioiojack.cc - audioiosun.cc - audioioaix.cc - audioionas.cc - cpuinfo.cc - audioioossthreaded.cc - audiotobytestream_impl.cc - audioiosgi.cc - audioiocsl.cc - audioiomas.cc - datahandle_impl.cc -) -include_directories( - ${CMAKE_BINARY_DIR} # for config.h - ${CMAKE_BINARY_DIR}/mcop # for arts_export.h - ${CMAKE_SOURCE_DIR}/mcop # for common.h - ${CMAKE_CURRENT_BINARY_DIR} # for gsl/gslconfig.h - ${CMAKE_CURRENT_SOURCE_DIR} # for gsl/gsldefs.h - ${GLIB2_INCLUDE_DIRS} # for glib.h +##### headers ################################### + +install( FILES + audiosubsys.h cache.h cachedwav.h convert.h + pipebuffer.h stdsynthmodule.h synthschedule.h + fft.h artsflow.idl audioio.h resample.h cpuinfo.h + bufferqueue.h gslschedule.h + ${CMAKE_CURRENT_BINARY_DIR}/artsflow.h + DESTINATION ${INCLUDE_INSTALL_DIR} ) + + +##### artsflow (shared lib) ##################### + +set( target artsflow ) + +set( ${target}_SRCS + synth_play_impl.cc gslschedule.cc audiosubsys.cc + pipebuffer.cc convert.cc synth_wave_sin_impl.cc + synth_frequency_impl.cc synth_multi_add_impl.cc + synth_add_impl.cc synth_mul_impl.cc synth_play_wav_impl.cc + stdsynthmodule.cc cache.cc asyncschedule.cc bytestreamtoaudio_impl.cc + stereovolumecontrol_impl.cc stereoeffectstack_impl.cc + fft.c stereofftscope_impl.cc virtualports.cc bus.cc + audiomanager_impl.cc synth_record_impl.cc resample.cc + audioio.cc audioiooss.cc audioioalsa.cc audioioalsa9.cc + audioionull.cc audioiolibaudioio.cc audioioesd.cc + audioiojack.cc audioiosun.cc audioioaix.cc audioionas.cc + cpuinfo.cc audioioossthreaded.cc audiotobytestream_impl.cc + audioiosgi.cc audioiocsl.cc audioiomas.cc datahandle_impl.cc ) -add_definitions( - -DHAVE_CONFIG_H +tde_add_library( ${target} SHARED + SOURCES ${${target}_SRCS} + VERSION 1.0.0 + LINK gsl-static gslpp-static artsflow_idl-shared ${AUDIOFILE_LIBRARIES} + DESTINATION ${LIB_INSTALL_DIR} ) -##### artsflow_idl +##### artsflow_idl (shared lib) ################# add_custom_command( OUTPUT artsflow.cc @@ -97,28 +69,10 @@ add_custom_command( ARGS -t ${CMAKE_CURRENT_SOURCE_DIR}/artsflow.idl DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/artsflow.idl ) -set( artsflow_idl_SRCS artsflow.cc ) -add_library( artsflow_idl SHARED ${artsflow_idl_SRCS} ) -set_target_properties( artsflow_idl PROPERTIES VERSION 1.0 SOVERSION 1 ) -target_link_libraries( artsflow_idl mcop ${ALSA_LIBRARY} ) -add_dependencies( artsflow_idl mcopidl ) - -##### artsflow - -add_library( artsflow SHARED ${artsflow_SRCS} ) -set_target_properties( artsflow PROPERTIES VERSION 1.0 SOVERSION 1 ) - -target_link_libraries( artsflow - artsflow_idl - mcop - gslpp - gsl - ${AUDIOFILE_LIBRARIES} +tde_add_library( artsflow_idl SHARED + SOURCES artsflow.cc + VERSION 1.0.0 + LINK mcop-shared ${ALSA_LIBRARY} + DESTINATION ${LIB_INSTALL_DIR} + DEPENDENCIES mcopidl ) - - - -##### install ################################### - -install( FILES ${artsflow_INCS} DESTINATION ${INCLUDE_INSTALL_DIR} ) -install( TARGETS artsflow_idl artsflow LIBRARY DESTINATION ${LIB_INSTALL_DIR} ) \ No newline at end of file diff --git a/flow/gsl/CMakeLists.txt b/flow/gsl/CMakeLists.txt index 7c880ee..952311b 100644 --- a/flow/gsl/CMakeLists.txt +++ b/flow/gsl/CMakeLists.txt @@ -103,61 +103,7 @@ set( GSL_USE_ARTS_THREADS 1 ) configure_file( gslconfig.h.in gslconfig.h @ONLY ) -##### compile ################################### - -set( gsl_INCS - ${CMAKE_CURRENT_BINARY_DIR}/gslconfig.h - gslcommon.h - gsldatacache.h - gsldatahandle.h - gsldefs.h - gslloader.h - gslmath.h - gslfilter.h - gsldatautils.h - gsldatahandle-vorbis.h - gslconvert.h - gslfft.h - gslieee754.h - gslsignal.h - gslmagic.h - gslengine.h - gslwaveosc.h - gslwavechunk.h - gsldatahandle-mad.h - gslosctable.h - gsloscillator.h -) - -set( gsl_SRCS - gsldatacache.c - gsldatahandle.c - gslwavechunk.c - gsldatahandle-vorbis.c - gslmath.c - gslfilter.c - gslcommon.c - gsldatautils.c - gslmagic.c - gslloader-wav.c - gslloader-gslwave.c - gslloader-mad.c - gslloader-oggvorbis.c - gslconvert.c - gslfft.c - gslsignal.c - gslloader.c - gslwaveosc.c - gslengine.c - gsloputil.c - gslopmaster.c - gslopschedule.c - gsldatahandle-mad.c - gslosctable.c - gsloscillator.c - gslfilehash.c - gslartsthreads.cc -) +##### include paths ############################# include_directories( ${CMAKE_BINARY_DIR} @@ -168,12 +114,37 @@ include_directories( ${GLIB2_INCLUDE_DIRS} ) -add_library( gsl STATIC ${gsl_SRCS} ) -set_target_properties( gsl PROPERTIES COMPILE_FLAGS -fPIC ) -target_link_libraries( gsl ${GLIB2_LIBRARIES} ${GTHREAD2_LIBRARIES} ${VORBISFILE_LIBRARIES} ${MAD_LIBRARIES} ) + +##### headers ################################### + +install( FILES + gslcommon.h gsldatacache.h gsldatahandle.h + gsldefs.h gslloader.h gslmath.h gslfilter.h + gsldatautils.h gsldatahandle-vorbis.h gslconvert.h + gslfft.h gslieee754.h gslsignal.h gslmagic.h + gslengine.h gslwaveosc.h gslwavechunk.h + gsldatahandle-mad.h gslosctable.h gsloscillator.h + ${CMAKE_CURRENT_BINARY_DIR}/gslconfig.h + DESTINATION ${INCLUDE_INSTALL_DIR}/gsl ) -##### install ################################### +##### gsl (static lib) ########################## -install( FILES ${gsl_INCS} DESTINATION ${INCLUDE_INSTALL_DIR}/gsl ) +set( target gsl ) + +set( ${target}_SRCS + gsldatacache.c gsldatahandle.c gslwavechunk.c + gsldatahandle-vorbis.c gslmath.c gslfilter.c + gslcommon.c gsldatautils.c gslmagic.c gslloader-wav.c + gslloader-gslwave.c gslloader-mad.c gslloader-oggvorbis.c + gslconvert.c gslfft.c gslsignal.c gslloader.c + gslwaveosc.c gslengine.c gsloputil.c gslopmaster.c + gslopschedule.c gsldatahandle-mad.c gslosctable.c + gsloscillator.c gslfilehash.c gslartsthreads.cc +) + +tde_add_library( ${target} STATIC_PIC + SOURCES ${${target}_SRCS} + LINK ${GLIB2_LIBRARIES} ${GTHREAD2_LIBRARIES} ${VORBISFILE_LIBRARIES} ${MAD_LIBRARIES} +) diff --git a/flow/gslpp/CMakeLists.txt b/flow/gslpp/CMakeLists.txt index bf145a6..cd8576c 100644 --- a/flow/gslpp/CMakeLists.txt +++ b/flow/gslpp/CMakeLists.txt @@ -16,9 +16,11 @@ include_directories( ${GLIB2_INCLUDE_DIRS} ) -set( gslpp_SRCS - datahandle.cpp -) -add_library( gslpp STATIC ${gslpp_SRCS} ) -set_target_properties( gslpp PROPERTIES COMPILE_FLAGS -fPIC) \ No newline at end of file +##### gslpp (static lib) ######################## + +set( target gslpp ) + +tde_add_library( ${target} STATIC_PIC + SOURCES datahandle.cpp +) diff --git a/flow/mcopclass/CMakeLists.txt b/flow/mcopclass/CMakeLists.txt index e69de29..913584c 100644 --- a/flow/mcopclass/CMakeLists.txt +++ b/flow/mcopclass/CMakeLists.txt @@ -0,0 +1,22 @@ +################################################# +# +# (C) 2010 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +##### other data ################################ + +install( FILES + Synth_ADD.mcopclass Synth_FREQUENCY.mcopclass + Synth_MUL.mcopclass Synth_MULTI_ADD.mcopclass + Synth_PLAY.mcopclass Synth_RECORD.mcopclass + Synth_PLAY_WAV.mcopclass Synth_WAVE_SIN.mcopclass + Synth_BUS_DOWNLINK.mcopclass Synth_BUS_UPLINK.mcopclass + Synth_AMAN_PLAY.mcopclass Synth_AMAN_RECORD.mcopclass + DataHandlePlay.mcopclass WaveDataHandle.mcopclass + DESTINATION ${LIB_INSTALL_DIR}/mcop/Arts ) diff --git a/gmcop/CMakeLists.txt b/gmcop/CMakeLists.txt index f49c194..84b9c75 100644 --- a/gmcop/CMakeLists.txt +++ b/gmcop/CMakeLists.txt @@ -9,26 +9,25 @@ # ################################################# -set( gmcop_INCS - giomanager.h -) - -set( gmcop_SRCS - giomanager.cc -) - include_directories( - ${CMAKE_BINARY_DIR}/mcop # for arts_export.h - ${CMAKE_SOURCE_DIR}/mcop # for iomanager.h, etc. + ${CMAKE_BINARY_DIR}/mcop + ${CMAKE_SOURCE_DIR}/mcop ${GLIB2_INCLUDE_DIRS} ) -add_library( gmcop SHARED ${gmcop_SRCS} ) -set_target_properties( gmcop PROPERTIES VERSION 1.0 SOVERSION 1 ) -target_link_libraries( gmcop mcop ${GLIB2_LIBRARIES} ) +##### headers ################################### -##### install ################################### +install( FILES + giomanager.h + DESTINATION ${INCLUDE_INSTALL_DIR} ) -install( FILES ${gmcop_INCS} DESTINATION ${INCLUDE_INSTALL_DIR} ) -install(TARGETS gmcop LIBRARY DESTINATION ${LIB_INSTALL_DIR} ) \ No newline at end of file + +##### gmcop (shared lib) ######################## + +tde_add_library( gmcop SHARED + SOURCES giomanager.cc + VERSION 1.0.0 + LINK mcop-shared ${GLIB2_LIBRARIES} + DESTINATION ${LIB_INSTALL_DIR} +) diff --git a/mcop/CMakeLists.txt b/mcop/CMakeLists.txt index 19bc6ee..fe62f9f 100644 --- a/mcop/CMakeLists.txt +++ b/mcop/CMakeLists.txt @@ -9,115 +9,63 @@ # ################################################# -set( mcop_INCS - ${CMAKE_CURRENT_BINARY_DIR}/arts_export.h - buffer.h - common.h - connection.h - core.h - dispatcher.h - factory.h - flowsystem.h - idlfilereg.h - ifacerepo_impl.h - iomanager.h - mcoputils.h - object.h - objectmanager.h - pool.h - socketconnection.h - startupmanager.h - tcpconnection.h - tcpserver.h - type.h - unixconnection.h - unixserver.h - referenceclean.h - datapacket.h - asyncstream.h - notification.h - extensionloader.h - mcopconfig.h - connect.h - reference.h - weakreference.h - dynamicrequest.h - anyref.h - debug.h - delayedreturn.h - dynamicskeleton.h - thread.h - core.idl -) - -set( mcop_SRCS - buffer.cc - connection.cc - core.cc - debug.cc - dispatcher.cc - iomanager.cc - object.cc - socketconnection.cc - tcpconnection.cc - unixconnection.cc - tcpserver.cc - unixserver.cc - objectmanager.cc - factory.cc - idlfilereg.cc - ifacerepo_impl.cc - mcoputils.cc - startupmanager.cc - md5.c - md5auth.cc - referenceclean.cc - datapacket.cc - asyncstream.cc - notification.cc - flowsystem.cc - extensionloader.cc - tmpglobalcomm.cc - mcopconfig.cc - connect.cc - reference.cc - type.cc - trader_impl.cc - dynamicrequest.cc - anyref.cc - loopback.cc - delayedreturn.cc - thread.cc - dynamicskeleton.cc -) - configure_file( arts_export.h.in arts_export.h ) if( NOT EXTENSION_DIR ) - set( EXTENSION_DIR \"${CMAKE_INSTALL_PREFIX}/lib\" ) + set( EXTENSION_DIR ${CMAKE_INSTALL_PREFIX}/lib ) endif( NOT EXTENSION_DIR ) if( NOT DTRADER_DIR ) - set( DTRADER_DIR \"${CMAKE_INSTALL_PREFIX}/lib/mcop\" ) + set( DTRADER_DIR ${CMAKE_INSTALL_PREFIX}/lib/mcop ) endif( NOT DTRADER_DIR ) add_definitions( - -DEXTENSION_DIR=${EXTENSION_DIR} - -DTRADER_DIR=${DTRADER_DIR} + -DEXTENSION_DIR=\"${EXTENSION_DIR}\" + -DTRADER_DIR=\"${DTRADER_DIR}\" ) include_directories( - ${CMAKE_BINARY_DIR} # for config.h - ${CMAKE_CURRENT_BINARY_DIR} # for arts_export.h + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_BINARY_DIR} ) -add_library( mcop SHARED ${mcop_SRCS} ) -target_link_libraries( mcop ltdlc ) -set_target_properties( mcop PROPERTIES VERSION 1.0.0 SOVERSION 1 ) -add_dependencies( mcop ltdlc ) +##### headers ################################### + +install( FILES + buffer.h common.h connection.h core.h dispatcher.h + factory.h flowsystem.h idlfilereg.h ifacerepo_impl.h + iomanager.h mcoputils.h object.h objectmanager.h + pool.h socketconnection.h startupmanager.h tcpconnection.h + tcpserver.h type.h unixconnection.h unixserver.h + referenceclean.h datapacket.h asyncstream.h notification.h + extensionloader.h mcopconfig.h connect.h reference.h + weakreference.h dynamicrequest.h anyref.h debug.h + delayedreturn.h dynamicskeleton.h thread.h core.idl + ${CMAKE_CURRENT_BINARY_DIR}/arts_export.h + DESTINATION ${INCLUDE_INSTALL_DIR} ) -##### install ################################### -install( FILES ${mcop_INCS} DESTINATION ${INCLUDE_INSTALL_DIR} ) -install( TARGETS mcop LIBRARY DESTINATION ${LIB_INSTALL_DIR} ) \ No newline at end of file +##### mcop (shared library) ##################### + +set( target mcop ) + +set( ${target}_SRCS + buffer.cc connection.cc core.cc debug.cc dispatcher.cc + iomanager.cc object.cc socketconnection.cc tcpconnection.cc + unixconnection.cc tcpserver.cc unixserver.cc objectmanager.cc + factory.cc idlfilereg.cc ifacerepo_impl.cc mcoputils.cc + startupmanager.cc md5.c md5auth.cc referenceclean.cc + datapacket.cc asyncstream.cc notification.cc + flowsystem.cc extensionloader.cc tmpglobalcomm.cc + mcopconfig.cc connect.cc reference.cc type.cc + trader_impl.cc dynamicrequest.cc anyref.cc + loopback.cc delayedreturn.cc thread.cc dynamicskeleton.cc +) + +tde_add_library( ${target} SHARED + SOURCES ${${target}_SRCS} + VERSION 1.0.0 + LINK ltdlc-static + DESTINATION ${LIB_INSTALL_DIR} +) diff --git a/mcop_mt/CMakeLists.txt b/mcop_mt/CMakeLists.txt index 09fed8c..d3cd471 100644 --- a/mcop_mt/CMakeLists.txt +++ b/mcop_mt/CMakeLists.txt @@ -9,10 +9,16 @@ # ################################################# -set( mcop_mt_SRCS - threads_posix.cc +include_directories( + ${CMAKE_BINARY_DIR} ) -add_library( mcop_mt SHARED ${mcop_mt_SRCS} ) -set_target_properties( mcop_mt PROPERTIES VERSION 1.0 SOVERSION 1 ) -target_link_libraries( mcop_mt mcop artsflow ) + +##### mcop_mt (shared lib ) ##################### + +tde_add_library( mcop_mt SHARED + SOURCES threads_posix.cc + VERSION 1.0.0 + LINK artsflow-shared + DESTINATION ${LIB_INSTALL_DIR} +) diff --git a/mcopidl/CMakeLists.txt b/mcopidl/CMakeLists.txt index ea87893..038e2b0 100644 --- a/mcopidl/CMakeLists.txt +++ b/mcopidl/CMakeLists.txt @@ -9,26 +9,22 @@ # ################################################# -set( mcopidl_SRCS - mcopidl.cc - yacc.cc - scanner.cc - namespace.cc -) - include_directories( ${CMAKE_BINARY_DIR}/mcop # for arts_export.h ${CMAKE_SOURCE_DIR}/mcop # for common.h ) -#link_directories( -# ${CMAKE_BINARY_DIR}/mcop -#) -add_executable( mcopidl ${mcopidl_SRCS} ) -target_link_libraries( mcopidl mcop ) +##### mcopidl ################################### +set( target mcopidl ) -##### install ################################### +set( ${target}_SRCS + mcopidl.cc yacc.cc scanner.cc namespace.cc +) -install( TARGETS mcopidl DESTINATION ${BIN_INSTALL_DIR} ) +tde_add_executable( ${target} + SOURCES ${${target}_SRCS} + LINK mcop-shared + DESTINATION ${BIN_INSTALL_DIR} +) diff --git a/qtmcop/CMakeLists.txt b/qtmcop/CMakeLists.txt index c972153..dbb73bf 100644 --- a/qtmcop/CMakeLists.txt +++ b/qtmcop/CMakeLists.txt @@ -15,36 +15,34 @@ add_definitions( include_directories( ${TQT_INCLUDE_DIRS} - ${CMAKE_CURRENT_BINARY_DIR} # for qiomanager_p.moc - ${CMAKE_BINARY_DIR}/mcop # for arts_export.h - ${CMAKE_SOURCE_DIR}/mcop # for iomanager.h, etc. + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_BINARY_DIR}/mcop + ${CMAKE_SOURCE_DIR}/mcop ) link_directories( ${TQT_LIBRARY_DIRS} ) -add_custom_command( - OUTPUT qiomanager_p.moc - COMMAND moc-tqt ARGS ${QT_MOC_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qiomanager_p.h qiomanager_p.moc - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/qiomanager_p.h -) -set( qtmcop_INCS - qiomanager.h -) +##### headers ################################### -set( qtmcop_SRCS - qiomanager.cc - qiomanager_p.moc -) +install( FILES + qiomanager.h + DESTINATION ${INCLUDE_INSTALL_DIR} ) -add_library( qtmcop SHARED ${qtmcop_SRCS} ) -set_target_properties( qtmcop PROPERTIES VERSION 1.0 SOVERSION 1 ) -target_link_libraries( qtmcop ${TQT_LIBRARIES} mcop ) +##### qtmcop ############################## -##### install ################################### +add_custom_command( + OUTPUT qiomanager_p.moc + COMMAND tmoc ${CMAKE_CURRENT_SOURCE_DIR}/qiomanager_p.h -o qiomanager_p.moc + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/qiomanager_p.h +) -install( FILES ${qtmcop_INCS} DESTINATION ${INCLUDE_INSTALL_DIR} ) -install(TARGETS qtmcop LIBRARY DESTINATION ${LIB_INSTALL_DIR} ) \ No newline at end of file +tde_add_library( qtmcop SHARED + SOURCES qiomanager.cc qiomanager_p.moc + VERSION 1.0.0 + LINK mcop-shared ${TQT_LIBRARIES} + DESTINATION ${LIB_INSTALL_DIR} +)