Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ITACTC
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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Institute of Technical Acoustics (ITA)
ITACTC
Commits
54fdfa64
Commit
54fdfa64
authored
3 years ago
by
Philipp Schäfer
Browse files
Options
Downloads
Patches
Plain Diff
CMake: fixed bug in INSTALL_INTERFACE and added comments
parent
d1ef3edc
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
CMakeLists.txt
+16
-3
16 additions, 3 deletions
CMakeLists.txt
with
16 additions
and
3 deletions
CMakeLists.txt
+
16
−
3
View file @
54fdfa64
...
@@ -14,10 +14,12 @@ if (NOT DEFINED CMAKE_RUNTIME_OUTPUT_DIRECTORY AND WIN32)
...
@@ -14,10 +14,12 @@ if (NOT DEFINED CMAKE_RUNTIME_OUTPUT_DIRECTORY AND WIN32)
set
(
CMAKE_LIBRARY_OUTPUT_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
/$<CONFIG>/lib
)
set
(
CMAKE_LIBRARY_OUTPUT_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
/$<CONFIG>/lib
)
endif
()
endif
()
# Organize targest in folders in Visual Studio
if
(
CMAKE_GENERATOR MATCHES
"Visual Studio"
)
if
(
CMAKE_GENERATOR MATCHES
"Visual Studio"
)
set_property
(
GLOBAL PROPERTY USE_FOLDERS ON
)
set_property
(
GLOBAL PROPERTY USE_FOLDERS ON
)
endif
()
endif
()
#---Options---
option
(
ITA_CTC_WITH_DUAL_CTC
"Build support for Crosstalk-Cancellation with arbitrary loudspeaker number and pose"
OFF
)
option
(
ITA_CTC_WITH_DUAL_CTC
"Build support for Crosstalk-Cancellation with arbitrary loudspeaker number and pose"
OFF
)
option
(
ITA_CTC_WITH_N_CTC
"Build support for two-loudspeaker Crosstalk-Cancellation (deprecated)"
ON
)
option
(
ITA_CTC_WITH_N_CTC
"Build support for two-loudspeaker Crosstalk-Cancellation (deprecated)"
ON
)
option
(
ITA_CTC_WITH_QUAD_CTC
"Build support for quad-loudspeaker Crosstalk-Cancellation (deprecated)"
OFF
)
option
(
ITA_CTC_WITH_QUAD_CTC
"Build support for quad-loudspeaker Crosstalk-Cancellation (deprecated)"
OFF
)
...
@@ -26,12 +28,16 @@ option (ITA_CTC_NCTC_EXPORT_FILTER_TO_HARDDRIVE
...
@@ -26,12 +28,16 @@ option (ITA_CTC_NCTC_EXPORT_FILTER_TO_HARDDRIVE
OFF
OFF
)
)
option
(
ITA_CTC_WITH_TESTS
"Build the tests for the library"
OFF
)
option
(
ITA_CTC_WITH_TESTS
"Build the tests for the library"
OFF
)
#---END: Options---
#External libs
add_subdirectory
(
external_libs
)
add_subdirectory
(
external_libs
)
#Library
add_library
(
${
PROJECT_NAME
}
include/ITACTCDefinitions.h
)
add_library
(
${
PROJECT_NAME
}
include/ITACTCDefinitions.h
)
add_library
(
${
PROJECT_NAME
}
::
${
PROJECT_NAME
}
ALIAS
${
PROJECT_NAME
}
)
add_library
(
${
PROJECT_NAME
}
::
${
PROJECT_NAME
}
ALIAS
${
PROJECT_NAME
}
)
#Additional source files
if
(
ITA_CTC_WITH_DUAL_CTC
)
if
(
ITA_CTC_WITH_DUAL_CTC
)
target_sources
(
target_sources
(
${
PROJECT_NAME
}
PRIVATE include/ITADualCTC.h include/ITADualCTCStreamFilter.h src/ITADualCTC.cpp
${
PROJECT_NAME
}
PRIVATE include/ITADualCTC.h include/ITADualCTCStreamFilter.h src/ITADualCTC.cpp
...
@@ -51,27 +57,34 @@ if (ITA_CTC_WITH_QUAD_CTC)
...
@@ -51,27 +57,34 @@ if (ITA_CTC_WITH_QUAD_CTC)
)
)
endif
()
endif
()
#Set include directory for library
target_include_directories
(
target_include_directories
(
${
PROJECT_NAME
}
PUBLIC $<BUILD_INTERFACE:
${
CMAKE_CURRENT_SOURCE_DIR
}
/include> $<INSTALL_INTERFACE:INCLUDE
_PATH
/ITACTC>
${
PROJECT_NAME
}
PUBLIC $<BUILD_INTERFACE:
${
CMAKE_CURRENT_SOURCE_DIR
}
/include> $<INSTALL_INTERFACE:
${
CMAKE_INSTALL_
INCLUDE
DIR
}
/ITACTC>
)
)
#Linking
target_link_libraries
(
target_link_libraries
(
${
PROJECT_NAME
}
PRIVATE ITABase::ITABase ITAFFT::ITAFFT ITADataSources::ITADataSources DAFF
${
PROJECT_NAME
}
PRIVATE ITABase::ITABase ITAFFT::ITAFFT ITADataSources::ITADataSources DAFF
ITAConvolution::ITAConvolution DAFF
ITAConvolution::ITAConvolution DAFF
)
)
#---Compile definitions---
if
(
ITA_CTC_NCTC_EXPORT_FILTER_TO_HARDDRIVE
)
if
(
ITA_CTC_NCTC_EXPORT_FILTER_TO_HARDDRIVE
)
target_compile_definitions
(
${
PROJECT_NAME
}
PRIVATE NCTC_EXPORT_FILTER_TO_HARDDRIVE
)
target_compile_definitions
(
${
PROJECT_NAME
}
PRIVATE NCTC_EXPORT_FILTER_TO_HARDDRIVE
)
endif
()
endif
()
#Definitions for Shared/Static
target_compile_definitions
(
${
PROJECT_NAME
}
PUBLIC $<IF:$<BOOL:
${
BUILD_SHARED_LIBS
}
>,ITA_CTC_EXPORT,ITA_CTC_STATIC>
)
target_compile_definitions
(
${
PROJECT_NAME
}
PUBLIC $<IF:$<BOOL:
${
BUILD_SHARED_LIBS
}
>,ITA_CTC_EXPORT,ITA_CTC_STATIC>
)
#Required compiler features
target_compile_features
(
${
PROJECT_NAME
}
PUBLIC cxx_std_11
)
target_compile_features
(
${
PROJECT_NAME
}
PUBLIC cxx_std_11
)
#---END: Compile definitions---
#If build out of VA project, add parent folder "ITACoreLibs"
if
(
NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR
)
if
(
NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR
)
set_property
(
TARGET
${
PROJECT_NAME
}
PROPERTY FOLDER
"ITACoreLibs"
)
set_property
(
TARGET
${
PROJECT_NAME
}
PROPERTY FOLDER
"ITACoreLibs"
)
endif
()
endif
()
#Install & export
packageProject
(
packageProject
(
NAME ITACTC
NAME ITACTC
VERSION
${
PROJECT_VERSION
}
VERSION
${
PROJECT_VERSION
}
...
@@ -84,7 +97,7 @@ packageProject (
...
@@ -84,7 +97,7 @@ packageProject (
DISABLE_VERSION_SUFFIX YES
DISABLE_VERSION_SUFFIX YES
)
)
#
t
ests
#
T
ests
if
(
ITA_CTC_WITH_TESTS
)
if
(
ITA_CTC_WITH_TESTS
)
add_subdirectory
(
tests
)
add_subdirectory
(
tests
)
endif
()
endif
()
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