Commit 44c52249 authored by Philipp Schäfer's avatar Philipp Schäfer Committed by Nils Rummler
Browse files

Cmake

- now files are moved to subfolders within VS solution
parent 4ef7d6b0
......@@ -65,142 +65,38 @@ endif( )
# includes
include_directories( "include" )
# files
set( ITABaseHeader
"include/ITABase/ITAProgress.h"
"include/ITABase/Spline.h"
"include/ITAAudioSample.h"
"include/ITABaseDefinitions.h"
"include/ITABlockMath.h"
"include/ITABufferedAudioFileWriter.h"
"include/ITAClock.h"
"include/ITAConstants.h"
"include/ITACriticalSection.h"
"include/ITADataLog.h"
"include/ITADebug.h"
"include/ITAEndianness.h"
"include/ITAException.h"
"include/ITAFade.h"
"include/ITAFastMath.h"
"include/ITAFileSystemUtils.h"
"include/ITAFiniteImpulseResponse.h"
"include/ITAFunctors.h"
"include/ITAHDFTSpectra.h"
"include/ITAHDFTSpectrum.h"
"include/ITAInterpolation.h"
"include/ITAISO9613.h"
"include/ITALog.h"
"include/ITAMagnitudeSpectrum.h"
"include/ITAMultichannelFiniteImpulseResponse.h"
"include/ITANumericUtils.h"
"include/ITASampleBuffer.h"
"include/ITASampleFrame.h"
"include/ITASampleTypeConversion.h"
"include/ITASimpleConvolution.h"
"include/ITASpectrum.h"
"include/ITAStopWatch.h"
"include/ITAStringUtils.h"
"include/ITAThirdOctaveMagnitudeSpectrum.h"
"include/ITATimeSeriesAnalyzer.h"
"include/ITATypes.h"
"include/ITAUncopyable.h"
"include/ITAWholeOctaveMagnitudeSpectrum.h"
"include/ITAWinPCClock.h"
)
set( ITABaseSources
"src/ITABlockMath.cpp"
"src/ITABufferedAudioFileWriter.cpp"
"src/ITAClock.cpp"
"src/ITACriticalSection.cpp"
"src/ITACriticalSectionImpl.h"
"src/ITACriticalSectionPosixImpl.h"
"src/ITACriticalSectionWin32Impl.h"
"src/ITADebug.cpp"
"src/ITAEndianness.cpp"
"src/ITAException.cpp"
"src/ITAFade.cpp"
"src/ITAFileSystemUtils.cpp"
"src/ITAFiniteImpulseResponse.cpp"
"src/ITAHDFTSpectra.cpp"
"src/ITAHDFTSpectrum.cpp"
"src/ITAInterpolation.cpp"
"src/ITAISO9613.cpp"
"src/ITALog.cpp"
"src/ITAMagnitudeSpectrum.cpp"
"src/ITAMultichannelFiniteImpulseResponse.cpp"
"src/ITANumericUtils.cpp"
"src/ITASampleBuffer.cpp"
"src/ITASampleFrame.cpp"
"src/ITASampleTypeConversion.cpp"
"src/ITASimpleConvolution.cpp"
"src/ITASpectrum.cpp"
"src/ITAStopWatch.cpp"
"src/ITATypes.cpp"
"src/ITAWinPCClock.cpp"
"src/ITABase/ITAProgress.cpp"
"src/ITABase/Spline.cpp"
)
# sources
include( "include/_SourceFiles.cmake" )
include( "src/_SourceFiles.cmake" )
if( ITA_BASE_WITH_JSON_SUPPORT )
vista_use_package( libjson REQUIRED )
add_definitions( -DWITH_JSON_SUPPORT )
list( APPEND ITABaseHeader "include/ITABase/UtilsJSON.h" )
list( APPEND ITABaseSources "src/ITABase/UtilsJSON.cpp" )
endif( )
# Win32 implementations
if( WIN32 )
list( APPEND ITABaseHeader "include/ITAHPT.h" "include/ITAMutex.h" "include/ITATimer.h" )
list( APPEND ITABaseSources "src/ITAHPT.cpp" "src/ITAMutex.cpp" "src/ITATimer.cpp" )
if( WIN32 ) # see _SourceFiles.cmake in subfolders
else( )
add_definitions( -DUSE_SIMPLEINI )
list( APPEND ITABaseSources "src/ITAPosixRealtimeClock.cpp" "src/simpleini/SimpleIni.h" "src/simpleini/ConvertUTF.h" "src/simpleini/ConvertUTF.c" )
list( APPEND ITABaseSources "src/ITAConfigUtilsSimpleIniImpl.cpp" )
endif( )
if( VSNDFILE_FOUND AND ITA_BASE_WITH_SNDFILE )
set( ITABaseHeader "${ITABaseHeader}"
"include/ITAAudiofileCommon.h"
"include/ITAAudiofileReader.h"
"include/ITAAudiofileWriter.h"
)
set( ITABaseSources "${ITABaseSources}"
"src/ITAAudiofileCommon.cpp"
"src/ITAAudiofileReader.cpp"
"src/ITAAudiofileWriter.cpp"
"src/libsndfileAudiofileReader.cpp"
"src/libsndfileAudiofileWriter.cpp"
)
add_definitions( -DITABASE_WITH_SNDFILE )
if( VSNDFILE_FOUND AND ITA_BASE_WITH_SNDFILE ) #see _SourceFiles.cmake in subfolders
add_definitions( -DITABASE_WITH_SNDFILE )
endif( )
if( VSAMPLERATE_FOUND AND ITA_BASE_WITH_SAMPLERATE )
set( ITABaseHeader "${ITABaseHeader}" "include/ITAAudioSample.h" )
set( ITABaseSources "${ITABaseSources}" "src/ITAAudioSample.cpp" )
# see _SourceFiles.cmake in subfolders
endif( )
if( VIPP_FOUND AND ITA_BASE_WITH_FASTMATH_IPP )
set( ITABaseSources "${ITABaseSources}" "src/ITAFastMathImplIPP.cpp" )
# see _SourceFiles.cmake in subfolders
elseif( ITA_BASE_WITH_FASTMATH_ASSEMBLER )
set( ITABaseSources "${ITABaseSources}" "src/ITAFastMathImplAssembler.cpp" ) # not recommended
else( )
set( ITABaseSources "${ITABaseSources}" "src/ITAFastMathImpl.cpp" )
# not recommended; see _SourceFiles.cmake in subfolders
endif( )
if( ITA_BASE_WITH_OLD_ATOMICS )
set( ITABaseHeader "${ITABaseHeader}" "include/ITAAtomicOps.h" "include/ITAAtomicPrimitives.h" )
if( WIN32 )
set( ITABaseSources "${ITABaseSources}" "src/ITAAtomicOpsWin32Impl.cpp" )
else( )
set( ITABaseSources "${ITABaseSources}" "src/ITAAtomicOpsGCCBuiltinsImpl.cpp" )
endif( )
if( ITA_BASE_WITH_OLD_ATOMICS ) # see _SourceFiles.cmake in subfolders
endif( )
if( ITA_BASE_WITH_OLD_RAVEN_OPS )
......@@ -210,24 +106,18 @@ if( ITA_BASE_WITH_OLD_RAVEN_OPS )
if( NOT VSPLINE_FOUND )
message( FATAL_ERROR "ITABase old RAVEN ops requires SPLINE, which was not found. Please provide." )
endif( )
set( ITABaseHeader "${ITABaseHeader}" "include/ITAOps.h" )
set( ITABaseSources "${ITABaseSources}" "src/ITAOps.cpp" )
# see _SourceFiles.cmake in subfolders
endif( )
if( VPCRE_FOUND AND ITA_BASE_WITH_REGULAR_EXPRESSIONS )
if( VPCRE_FOUND AND ITA_BASE_WITH_REGULAR_EXPRESSIONS ) # see _SourceFiles.cmake in subfolders
add_definitions( -DPCRE_STATIC )
list( APPEND ITABaseHeaders "include/ITAASCIITable.h" )
list( APPEND ITABaseSources "src/ITAStringUtilsPCRE.cpp" "src/ITAASCIITable.cpp" )
else( )
list( APPEND ITABaseSources "src/ITAStringUtils.cpp" )
endif( )
if( ITA_BASE_WITH_CONFIG_OLD_IMPL AND NOT ITA_BASE_WITH_CONFIG_SIMPLE_INI )
if( NOT ITA_BASE_WITH_REGULAR_EXPRESSIONS )
message( FATAL_ERROR "ITABase old config implementation requires regular expressions. Please activate." )
endif( )
list( APPEND ITABaseHeader "include/ITAConfigUtils.h" )
list( APPEND ITABaseSources "src/ITAConfigUtils.cpp" "src/ITAConfigUtilsWin32Impl.cpp" )
# see _SourceFiles.cmake in subfolders
endif( )
......@@ -251,7 +141,7 @@ endif( )
# linker
add_library( ITABase ${ITABaseHeader} ${ITABaseSources} )
add_library( ITABase ${ProjectSources} )
target_link_libraries( ITABase ${VISTA_USE_PACKAGE_LIBRARIES} )
......
# $Id:$
set( RelativeDir "include/ITABase" )
set( RelativeSourceGroup "Header Files\\ITABase" )
set( SubDirs )
set( DirFiles
ITAProgress.h
Spline.h
)
if( ITA_BASE_WITH_JSON_SUPPORT )
list( APPEND DirFiles UtilsJSON.h )
endif()
set( DirFiles_SourceGroup "${RelativeSourceGroup}" )
set( LocalSourceGroupFiles )
foreach( File ${DirFiles} )
list( APPEND LocalSourceGroupFiles "${RelativeDir}/${File}" )
list( APPEND ProjectSources "${RelativeDir}/${File}" )
endforeach()
source_group( ${DirFiles_SourceGroup} FILES ${LocalSourceGroupFiles} )
set( SubDirFiles "" )
foreach( Dir ${SubDirs} )
list( APPEND SubDirFiles "${RelativeDir}/${Dir}/_SourceFiles.cmake" )
endforeach()
foreach( SubDirFile ${SubDirFiles} )
include( ${SubDirFile} )
endforeach()
# $Id:$
set( RelativeDir "include" )
set( RelativeSourceGroup "Header Files" )
set( SubDirs ITABase)
set( DirFiles
ITAAudioSample.h
ITABaseDefinitions.h
ITABlockMath.h
ITABufferedAudioFileWriter.h
ITAClock.h
ITAConstants.h
ITACriticalSection.h
ITADataLog.h
ITADebug.h
ITAEndianness.h
ITAException.h
ITAFade.h
ITAFastMath.h
ITAFileSystemUtils.h
ITAFiniteImpulseResponse.h
ITAFunctors.h
ITAHDFTSpectra.h
ITAHDFTSpectrum.h
ITAInterpolation.h
ITAISO9613.h
ITALog.h
ITAMagnitudeSpectrum.h
ITAMultichannelFiniteImpulseResponse.h
ITANumericUtils.h
ITASampleBuffer.h
ITASampleFrame.h
ITASampleTypeConversion.h
ITASimpleConvolution.h
ITASpectrum.h
ITAStopWatch.h
ITAStringUtils.h
ITAThirdOctaveMagnitudeSpectrum.h
ITATimeSeriesAnalyzer.h
ITATypes.h
ITAUncopyable.h
ITAWholeOctaveMagnitudeSpectrum.h
ITAWinPCClock.h
)
# Win32 implementations
if( WIN32 )
list( APPEND DirFiles
ITAHPT.h
ITAMutex.h
ITATimer.h
)
endif()
if( VSNDFILE_FOUND AND ITA_BASE_WITH_SNDFILE )
list( APPEND DirFiles
ITAAudiofileCommon.h
ITAAudiofileReader.h
ITAAudiofileWriter.h
)
endif()
if( VSAMPLERATE_FOUND AND ITA_BASE_WITH_SAMPLERATE )
list( APPEND DirFiles ITAAudioSample.h )
endif( )
if( ITA_BASE_WITH_OLD_ATOMICS )
list( APPEND DirFiles
ITAAtomicOps.h
ITAAtomicPrimitives.h
)
endif()
if( ITA_BASE_WITH_OLD_RAVEN_OPS )
list( APPEND DirFiles ITAOps.h )
endif()
if( VPCRE_FOUND AND ITA_BASE_WITH_REGULAR_EXPRESSIONS )
list( APPEND DirFiles ITAASCIITable.h )
endif()
if( ITA_BASE_WITH_CONFIG_OLD_IMPL AND NOT ITA_BASE_WITH_CONFIG_SIMPLE_INI )
list( APPEND DirFiles ITAConfigUtils.h )
endif()
set( DirFiles_SourceGroup "${RelativeSourceGroup}" )
set( LocalSourceGroupFiles )
foreach( File ${DirFiles} )
list( APPEND LocalSourceGroupFiles "${RelativeDir}/${File}" )
list( APPEND ProjectSources "${RelativeDir}/${File}" )
endforeach()
source_group( ${DirFiles_SourceGroup} FILES ${LocalSourceGroupFiles} )
set( SubDirFiles "" )
foreach( Dir ${SubDirs} )
list( APPEND SubDirFiles "${RelativeDir}/${Dir}/_SourceFiles.cmake" )
endforeach()
foreach( SubDirFile ${SubDirFiles} )
include( ${SubDirFile} )
endforeach()
# $Id:$
set( RelativeDir "src/ITABase" )
set( RelativeSourceGroup "Source Files\\ITABase" )
set( SubDirs )
set( DirFiles
ITAProgress.cpp
Spline.cpp
)
if( ITA_BASE_WITH_JSON_SUPPORT )
list( APPEND DirFiles UtilsJSON.cpp )
endif( )
set( DirFiles_SourceGroup "${RelativeSourceGroup}" )
set( LocalSourceGroupFiles )
foreach( File ${DirFiles} )
list( APPEND LocalSourceGroupFiles "${RelativeDir}/${File}" )
list( APPEND ProjectSources "${RelativeDir}/${File}" )
endforeach()
source_group( ${DirFiles_SourceGroup} FILES ${LocalSourceGroupFiles} )
set( SubDirFiles "" )
foreach( Dir ${SubDirs} )
list( APPEND SubDirFiles "${RelativeDir}/${Dir}/_SourceFiles.cmake" )
endforeach()
foreach( SubDirFile ${SubDirFiles} )
include( ${SubDirFile} )
endforeach()
# $Id:$
set( RelativeDir "src" )
set( RelativeSourceGroup "Source Files" )
set( SubDirs ITABase)
set( DirFiles
ITABlockMath.cpp
ITABufferedAudioFileWriter.cpp
ITAClock.cpp
ITACriticalSection.cpp
ITACriticalSectionImpl.h
ITACriticalSectionPosixImpl.h
ITACriticalSectionWin32Impl.h
ITADebug.cpp
ITAEndianness.cpp
ITAException.cpp
ITAFade.cpp
ITAFileSystemUtils.cpp
ITAFiniteImpulseResponse.cpp
ITAHDFTSpectra.cpp
ITAHDFTSpectrum.cpp
ITAInterpolation.cpp
ITAISO9613.cpp
ITALog.cpp
ITAMagnitudeSpectrum.cpp
ITAMultichannelFiniteImpulseResponse.cpp
ITANumericUtils.cpp
ITASampleBuffer.cpp
ITASampleFrame.cpp
ITASampleTypeConversion.cpp
ITASimpleConvolution.cpp
ITASpectrum.cpp
ITAStopWatch.cpp
ITATypes.cpp
ITAWinPCClock.cpp
)
# Win32 implementations
if( WIN32 )
list( APPEND DirFiles
ITAHPT.cpp
ITAMutex.cpp
ITATimer.cpp
)
else( )
list( APPEND SubDirs simpleini )
list( APPEND DirFiles
ITAPosixRealtimeClock.cpp
ITAConfigUtilsSimpleIniImpl.cpp
)
endif( )
if( VSNDFILE_FOUND AND ITA_BASE_WITH_SNDFILE )
list( APPEND DirFiles
ITAAudiofileCommon.cpp
ITAAudiofileReader.cpp
ITAAudiofileWriter.cpp
libsndfileAudiofileReader.cpp
libsndfileAudiofileWriter.cpp
)
endif()
if( VSAMPLERATE_FOUND AND ITA_BASE_WITH_SAMPLERATE )
list( APPEND DirFiles ITAAudioSample.cpp )
endif( )
if( VIPP_FOUND AND ITA_BASE_WITH_FASTMATH_IPP )
list( APPEND DirFiles ITAFastMathImplIPP.cpp )
elseif( ITA_BASE_WITH_FASTMATH_ASSEMBLER )
list( APPEND DirFiles ITAFastMathImplAssembler.cpp ) # not recommended
else( )
list( APPEND DirFiles ITAFastMathImpl.cpp )
endif( )
if( ITA_BASE_WITH_OLD_ATOMICS )
if( WIN32 )
list( APPEND DirFiles ITAAtomicOpsWin32Impl.cpp )
else( )
list( APPEND DirFiles ITAAtomicOpsGCCBuiltinsImpl.cpp )
endif( )
endif()
if( ITA_BASE_WITH_OLD_RAVEN_OPS )
list( APPEND DirFiles ITAOps.cpp )
endif()
if( VPCRE_FOUND AND ITA_BASE_WITH_REGULAR_EXPRESSIONS )
list( APPEND DirFiles
ITAStringUtilsPCRE.cpp
ITAASCIITable.cpp
)
else( )
list( APPEND DirFiles ITAStringUtils.cpp )
endif( )
if( ITA_BASE_WITH_CONFIG_OLD_IMPL AND NOT ITA_BASE_WITH_CONFIG_SIMPLE_INI )
list( APPEND DirFiles
ITAConfigUtils.cpp
ITAConfigUtilsWin32Impl.cpp
)
endif()
set( DirFiles_SourceGroup "${RelativeSourceGroup}" )
set( LocalSourceGroupFiles )
foreach( File ${DirFiles} )
list( APPEND LocalSourceGroupFiles "${RelativeDir}/${File}" )
list( APPEND ProjectSources "${RelativeDir}/${File}" )
endforeach()
source_group( ${DirFiles_SourceGroup} FILES ${LocalSourceGroupFiles} )
set( SubDirFiles "" )
foreach( Dir ${SubDirs} )
list( APPEND SubDirFiles "${RelativeDir}/${Dir}/_SourceFiles.cmake" )
endforeach()
foreach( SubDirFile ${SubDirFiles} )
include( ${SubDirFile} )
endforeach()
# $Id:$
set( RelativeDir "src/simpleini" )
set( RelativeSourceGroup "Source Files\\simpleini" )
set( SubDirs )
set( DirFiles
SimpleIni.h
ConvertUTF.h
ConvertUTF.c
)
set( DirFiles_SourceGroup "${RelativeSourceGroup}" )
set( LocalSourceGroupFiles )
foreach( File ${DirFiles} )
list( APPEND LocalSourceGroupFiles "${RelativeDir}/${File}" )
list( APPEND ProjectSources "${RelativeDir}/${File}" )
endforeach()
source_group( ${DirFiles_SourceGroup} FILES ${LocalSourceGroupFiles} )
set( SubDirFiles "" )
foreach( Dir ${SubDirs} )
list( APPEND SubDirFiles "${RelativeDir}/${Dir}/_SourceFiles.cmake" )
endforeach()
foreach( SubDirFile ${SubDirFiles} )
include( ${SubDirFile} )
endforeach()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment