Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ITASampler
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Institute of Technical Acoustics (ITA)
ITASampler
Commits
62aaf6c9
Commit
62aaf6c9
authored
2 years ago
by
Pascal Palenda
Browse files
Options
Downloads
Patches
Plain Diff
Feat: use `ihta_add_lib` macro
parent
0f78afb0
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CMakeLists.txt
+29
-42
29 additions, 42 deletions
CMakeLists.txt
with
29 additions
and
42 deletions
CMakeLists.txt
+
29
−
42
View file @
62aaf6c9
...
...
@@ -12,55 +12,42 @@ project (
option
(
ITA_SAMPLER_WITH_TESTS
"Build the tests for the library"
OFF
)
# Library
add_library
(
${
PROJECT_NAME
}
include/ITASampleClock.h
include/ITASamplerDefinition.h
include/ITASoundSample.h
include/ITASoundSamplePool.h
include/ITASoundSampler.h
src/ITASoundSampler.cpp
src/ITASoundSampleImpl.cpp
src/ITASoundSampleImpl.h
src/ITASoundSamplePool.cpp
src/ITASoundSamplePoolImpl.cpp
src/ITASoundSamplePoolImpl.h
src/ITASoundSamplerImpl.h
src/ITASoundSamplerImpl.cpp
src/ITASoundSamplerImpl.h
src/ITASoundSamplerImpl.cpp
src/ITASoundSamplerPlayback.h
src/ITASoundSamplerSlot.h
src/ITASoundSamplerSlotbuffer.h
src/ITASoundSamplerSlotbuffer.cpp
src/PlaybackIDGenerator.cpp
src/PlaybackIDGenerator.h
)
add_library
(
${
PROJECT_NAME
}
::
${
PROJECT_NAME
}
ALIAS
${
PROJECT_NAME
}
)
# Set include directory for library
target_include_directories
(
${
PROJECT_NAME
}
PUBLIC $<BUILD_INTERFACE:
${
CMAKE_CURRENT_SOURCE_DIR
}
/include>
$<INSTALL_INTERFACE:
${
CMAKE_INSTALL_INCLUDEDIR
}
/ITASampler>
ihta_add_library
(
NAME
${
PROJECT_NAME
}
SOURCES include/ITASampleClock.h
include/ITASamplerDefinition.h
include/ITASoundSample.h
include/ITASoundSamplePool.h
include/ITASoundSampler.h
src/ITASoundSampler.cpp
src/ITASoundSampleImpl.cpp
src/ITASoundSampleImpl.h
src/ITASoundSamplePool.cpp
src/ITASoundSamplePoolImpl.cpp
src/ITASoundSamplePoolImpl.h
src/ITASoundSamplerImpl.h
src/ITASoundSamplerImpl.cpp
src/ITASoundSamplerImpl.h
src/ITASoundSamplerImpl.cpp
src/ITASoundSamplerPlayback.h
src/ITASoundSamplerSlot.h
src/ITASoundSamplerSlotbuffer.h
src/ITASoundSamplerSlotbuffer.cpp
src/PlaybackIDGenerator.cpp
src/PlaybackIDGenerator.h
NAMESPACE
${
PROJECT_NAME
}
INSTALL_INCLUDE_DIR ITASampler
IDE_FOLDER
"ITACoreLibs"
OUT_LIB LIB_TARGET
)
# Linking
target_link_libraries
(
${
PROJECT_NAME
}
PRIVATE ITABase::ITABase ITADataSources::ITADataSources
)
target_link_libraries
(
${
LIB_TARGET
}
PRIVATE ITABase::ITABase ITADataSources::ITADataSources
)
# Definitions for Shared/Static
target_compile_definitions
(
${
PROJECT_NAME
}
PUBLIC $<IF:$<BOOL:
${
BUILD_SHARED_LIBS
}
>,ITA_SAMPLER_EXPORT,ITA_SAMPLER_STATIC>
${
LIB_TARGET
}
PUBLIC $<IF:$<BOOL:
${
BUILD_SHARED_LIBS
}
>,ITA_SAMPLER_EXPORT,ITA_SAMPLER_STATIC>
)
# Required compiler features
target_compile_features
(
${
PROJECT_NAME
}
PUBLIC cxx_std_17
)
# If build out of ITACoreLibs project, add parent folder "ITACoreLibs"
if
(
NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR
)
set_property
(
TARGET
${
PROJECT_NAME
}
PROPERTY FOLDER
"ITACoreLibs"
)
endif
()
# Organize sources in folders
GroupSourcesByFolder
(
${
PROJECT_NAME
}
)
# Install & export
packageProject
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment