Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Institute of Technical Acoustics (ITA)
ITAConvolution
Commits
215ed496
Commit
215ed496
authored
Nov 09, 2021
by
Philipp Schäfer
Browse files
CMake: fixed bug in INSTALL_INTERFACE and added comments
parent
9b0bc7dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
215ed496
...
...
@@ -14,10 +14,12 @@ if (NOT DEFINED CMAKE_RUNTIME_OUTPUT_DIRECTORY AND WIN32)
set
(
CMAKE_LIBRARY_OUTPUT_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
/$<CONFIG>/lib
)
endif
()
# Organize targest in folders in Visual Studio
if
(
CMAKE_GENERATOR MATCHES
"Visual Studio"
)
set_property
(
GLOBAL PROPERTY USE_FOLDERS ON
)
endif
()
#---Options---
option
(
ITA_CONVOLUTION_UPCONV_WITH_POWER_SAVER
"Use power saving mode for uniform partitioned convolution (do not convolve blocks with zeros)"
ON
)
...
...
@@ -36,9 +38,12 @@ option (ITA_CONVOLUTION_WITH_TESTS "Build the tests for the library" OFF)
if
(
ITA_CONVOLUTION_NUPCONV_WITH_PERFORMANCE_LOGGER OR ITA_CONVOLUTION_NUPCONV_WITH_XML_READER
)
message
(
FATAL_ERROR
"Performance logger is deprecated, as the XML library cannot be found."
)
endif
()
#---END: Options---
#External libs
add_subdirectory
(
external_libs
)
#Library
add_library
(
${
PROJECT_NAME
}
include/ITAUPConvolution.h
...
...
@@ -56,6 +61,7 @@ add_library (
)
add_library
(
${
PROJECT_NAME
}
::
${
PROJECT_NAME
}
ALIAS
${
PROJECT_NAME
}
)
#Additional source files
if
(
ITA_CONVOLUTION_WITH_NUPCONV
)
target_sources
(
${
PROJECT_NAME
}
...
...
@@ -113,22 +119,27 @@ if (ITA_CONVOLUTION_WITH_NUPCONV)
endif
()
endif
()
#Set include directory for library
target_include_directories
(
${
PROJECT_NAME
}
PUBLIC $<BUILD_INTERFACE:
${
CMAKE_CURRENT_SOURCE_DIR
}
/include> $<INSTALL_INTERFACE:INCLUDE
_PATH
/ITAConvolution>
${
PROJECT_NAME
}
PUBLIC $<BUILD_INTERFACE:
${
CMAKE_CURRENT_SOURCE_DIR
}
/include> $<INSTALL_INTERFACE:
${
CMAKE_INSTALL_
INCLUDE
DIR
}
/ITAConvolution>
)
#Linking
target_link_libraries
(
${
PROJECT_NAME
}
PUBLIC ITABase::ITABase ITAFFT::ITAFFT TBB::tbb
)
#Definitions for Shared/Static
target_compile_definitions
(
${
PROJECT_NAME
}
PUBLIC $<IF:$<BOOL:
${
BUILD_SHARED_LIBS
}
>,ITA_CONVOLUTION_EXPORT,ITA_CONVOLUTION_STATIC>
)
#Required compiler features
target_compile_features
(
${
PROJECT_NAME
}
PUBLIC cxx_std_11
)
#If build out of VA project, add parent folder "ITACoreLibs"
if
(
NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR
)
set_property
(
TARGET
${
PROJECT_NAME
}
PROPERTY FOLDER
"ITACoreLibs"
)
endif
()
#Install & export
packageProject
(
NAME
${
PROJECT_NAME
}
VERSION
${
PROJECT_VERSION
}
...
...
@@ -141,12 +152,12 @@ packageProject (
DISABLE_VERSION_SUFFIX YES
)
#
b
enchmarks
#
B
enchmarks
if
(
ITA_CONVOLUTION_WITH_BENCHMARKS
)
add_subdirectory
(
benchmarks
)
endif
()
#
p
rofiler
#
P
rofiler
if
(
ITA_CONVOLUTION_WITH_PROFILERS
AND ITA_CONVOLUTION_NUPCONV_WITH_PERFORMANCE_LOGGER
AND ITA_CONVOLUTION_WITH_NUPCONV
...
...
@@ -154,12 +165,12 @@ if (ITA_CONVOLUTION_WITH_PROFILERS
add_subdirectory
(
profilers
)
endif
()
#
a
pps
#
A
pps
if
(
ITA_CONVOLUTION_WITH_APPS
)
add_subdirectory
(
apps
)
endif
()
#
t
ests
#
T
ests
if
(
ITA_CONVOLUTION_WITH_TESTS
)
add_subdirectory
(
tests
)
endif
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment