@ -29,28 +29,60 @@ MACRO(SUBDIRLIST result curdir)
SET ( ${ result } ${ dirlist } )
ENDMACRO ( )
set ( FLUID_PATH ~/fluid_decomposition CACHE PATH "The top level of the fluid_decomposition repo" )
set ( LOCAL_INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/include" )
include ( FetchContent )
set ( FETCHCONTENT_QUIET FALSE )
if ( DEFINED FLUID_PATH )
get_filename_component ( FLUID_PATH ${ FLUID_PATH } ABSOLUTE )
message ( ${ FLUID_PATH } )
FetchContent_Declare (
f l u i d _ d e c o m p o s i t i o n
# U R L $ { F L U I D _ P A T H }
D O W N L O A D _ C O M M A N D " "
S O U R C E _ D I R " $ { F L U I D _ P A T H } / "
)
else ( )
FetchContent_Declare (
f l u i d _ d e c o m p o s i t i o n
G I T _ R E P O S I T O R Y h t t p s : / / b i t b u c k e t . o r g / f l u c o m a / f l u i d _ d e c o m p o s i t i o n . g i t
G I T _ P R O G R E S S T R U E
)
endif ( )
if ( DEFINED FLUID_M_PATH )
get_filename_component ( FLUID_M_PATH ${ FLUID_M_PATH } ABSOLUTE )
FetchContent_Declare (
f l u i d _ m a n i p u l a t i o n
# U R L $ { F L U I D _ M _ P A T H }
D O W N L O A D _ C O M M A N D " "
S O U R C E _ D I R " $ { F L U I D _ M _ P A T H } / "
)
else ( )
FetchContent_Declare (
f l u i d _ m a n i p u l a t i o n
G I T _ R E P O S I T O R Y h t t p s : / / b i t b u c k e t . o r g / f l u c o m a / f l u i d _ m a n i p u l a t i o n . g i t
G I T _ P R O G R E S S T R U E
)
endif ( )
get_filename_component ( FLUID_ABS_PATH "${FLUID_PATH}" ABSOLUTE )
message ( "${FLUID_ABS_PATH}" )
# if ( NOT DEFINED ${ FLUID_DECOMP_PATH } )
# message ( FATAL_ERROR "Please set the path to the fluid_decomposition sources with -DFLUID_DECOMP_PATH=<path>" )
# endif ( )
FetchContent_GetProperties( fluid_decomposition )
if( NOT fluid_decomposition_POPULATED )
FetchContent_Populate ( fluid_decomposition )
add_subdirectory ( ${ fluid_decomposition_SOURCE_DIR } ${ fluid_decomposition_BINARY_DIR } )
endif ( )
if ( NOT ( EXISTS "${FLUID_ABS_PATH}/build/fluid_decomposition-exports.cmake" ) )
message ( FATAL_ERROR "Can't find the fluid_decomposition CMake targets file at ${FLUID_ABS_PATH}/build/fluid_decomposition-exports.cmake. Please go to ${FLUID_ABS_PATH}/build and run CMake" )
FetchContent_GetProperties ( fluid_manipulation )
if ( NOT fluid_manipulation_POPULATED )
FetchContent_Populate ( fluid_manipulation )
add_subdirectory ( ${ fluid_manipulation_SOURCE_DIR } ${ fluid_manipulation_BINARY_DIR } )
endif ( )
if ( NOT ( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/release-packaging/AudioFiles/" ) )
file ( MAKE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/release-packaging/AudioFiles/" )
endif ( )
file ( COPY "${FLUID_ABS_PATH}/AudioFiles/" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/release-packaging/AudioFiles/" )
include ( "${FLUID_ABS_PATH}/build/fluid_decomposition-exports.cmake" )
file ( COPY "${fluid_decomposition_SOURCE_DIR}/AudioFiles/" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/release-packaging/AudioFiles/" )
set ( CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/release-packaging/plugins" )
set ( CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}" )
@ -61,26 +93,9 @@ if(APPLE OR WIN32)
set ( CMAKE_SHARED_MODULE_SUFFIX ".scx" )
endif ( )
get_property ( FFT_SOURCES TARGET HISSTools_FFT PROPERTY INTERFACE_SOURCES )
get_property ( FFT_LINK TARGET HISSTools_FFT PROPERTY INTERFACE_LINK_LIBRARIES )
add_library ( FFTLIB STATIC ${ FFT_SOURCES } )
target_link_libraries (
F F T L I B P R I V A T E $ { F F T _ L I N K }
)
if ( WIN32 )
target_compile_options (
F F T L I B P R I V A T E $ < $ < N O T : $ < C O N F I G : D E B U G > > : / a r c h : A V X >
)
else ( WIN32 )
target_compile_options (
F F T L I B P R I V A T E $ < $ < N O T : $ < C O N F I G : D E B U G > > : - m a v x - m s s e - m s s e 2 - m s s e 3 - m s s e 4 >
)
endif ( WIN32 )
# n e e d e d f o r c o m p l a i n t - f r e e s t a t i c l i n k i n g w i t h G C C
if ( CMAKE_COMPILER_IS_GNUCXX )
target_compile_options ( FFTLIB PUBLIC -fPIC )
target_compile_options ( HISSTools_FFT PUBLIC -fPIC )
ENDIF ( CMAKE_COMPILER_IS_GNUCXX )
add_library ( FLUID_SC_WRAPPER INTERFACE )