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
f798db37
Commit
f798db37
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
e394984a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CMakeLists.txt
+12
-6
12 additions, 6 deletions
CMakeLists.txt
with
12 additions
and
6 deletions
CMakeLists.txt
+
12
−
6
View file @
f798db37
...
...
@@ -14,12 +14,15 @@ 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_SAMPLER_WITH_TESTS
"Build the tests for the library"
OFF
)
#Library
add_library
(
${
PROJECT_NAME
}
include/ITASampleClock.h
...
...
@@ -46,22 +49,25 @@ add_library (
)
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:INCLUDE
_PATH
/ITASampler>
${
PROJECT_NAME
}
PUBLIC $<BUILD_INTERFACE:
${
CMAKE_CURRENT_SOURCE_DIR
}
/include> $<INSTALL_INTERFACE:
${
CMAKE_INSTALL_
INCLUDE
DIR
}
/ITASampler>
)
#Linking
target_link_libraries
(
${
PROJECT_NAME
}
PRIVATE ITABase::ITABase ITADataSources::ITADataSources
)
target_compile_definitions
(
${
PROJECT_NAME
}
PUBLIC $<IF:$<BOOL:
${
BUILD_SHARED_LIBS
}
>,ITA_SAMPLER_EXPORT,ITA_SAMPLER_STATIC>
)
#Definitions for Shared/Static
target_compile_definitions
(
${
PROJECT_NAME
}
PUBLIC $<IF:$<BOOL:
${
BUILD_SHARED_LIBS
}
>,ITA_SAMPLER_EXPORT,ITA_SAMPLER_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
}
...
...
@@ -74,7 +80,7 @@ packageProject (
DISABLE_VERSION_SUFFIX YES
)
#
t
ests
#
T
ests
if
(
ITA_SAMPLER_WITH_TESTS
)
add_subdirectory
(
tests
)
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