diff options
Diffstat (limited to 'artsc/CMakeLists.txt')
-rw-r--r-- | artsc/CMakeLists.txt | 103 |
1 files changed, 103 insertions, 0 deletions
diff --git a/artsc/CMakeLists.txt b/artsc/CMakeLists.txt new file mode 100644 index 0000000..c8659c3 --- /dev/null +++ b/artsc/CMakeLists.txt @@ -0,0 +1,103 @@ +################################################# +# +# (C) 2010 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +##### variables for artsc-config ################ + +set( prefix ${CMAKE_INSTALL_PREFIX} ) +set( exec_prefix $prefix ) +set( libdir $prefix/${LIB_INSTALL_DIR} ) +set( includedir ${prefix}/${INCLUDE_INSTALL_DIR} ) +set( LIBDL -l${DL_LIBRARIES} ) +set( USE_THREADS ) +set( LIBPTHREAD ${CMAKE_THREAD_LIBS_INIT} ) +foreach( LIB ${GTHREAD2_LIBRARIES} ) + set( GLIB_LDFLAGS "${GLIB_LDFLAGS} -l${LIB}" ) +endforeach(LIB) +set( GLIB_LIBADD ) +foreach( INC ${GTHREAD2_INCLUDE_DIRS} ) + set( GLIB_CFLAGS "${GLIB_CFLAGS} -I${INC}" ) +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 +) + +add_definitions( + -DCOMPILING_ARTSC +) + +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 +) + +##### libartsdsp ################################ + +set( artsdsp_SRCS + artsdsp.c +) + +add_library( artsdsp SHARED ${artsdsp_SRCS} ) +set_target_properties( artsdsp PROPERTIES VERSION 0.0 SOVERSION 0 ) +target_link_libraries( artsdsp artsc ) + + +##### libartsdsp_st ############################# + +set( artsdsp_st_SRCS + artsc.c + artsdsp.c +) + +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 ################################## + +set( artsc_SRCS + artsc.c +) + +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} ) + + +##### libartscbackend ########################### + +set( artscbackend_SRCS + artscbackend.cc +) + +add_library( artscbackend SHARED ${artscbackend_SRCS} ) +set_target_properties( artscbackend PROPERTIES VERSION 0.0 SOVERSION 0 ) +target_link_libraries( artscbackend ${FLOWLIBS} soundserver_idl ) + + +##### install ################################### + +#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 |