Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Ale
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
aflab
astrogeology
Ale
Commits
41a32cb9
Commit
41a32cb9
authored
5 years ago
by
Jesse Mapel
Committed by
Jesse Mapel
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fixed installing headers
parent
e5f210da
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
+12
-8
12 additions, 8 deletions
CMakeLists.txt
with
12 additions
and
8 deletions
CMakeLists.txt
+
12
−
8
View file @
41a32cb9
...
@@ -24,16 +24,17 @@ find_package(nlohmann_json REQUIRED)
...
@@ -24,16 +24,17 @@ find_package(nlohmann_json REQUIRED)
add_library
(
ale SHARED
add_library
(
ale SHARED
${
CMAKE_CURRENT_SOURCE_DIR
}
/src/ale.cpp
${
CMAKE_CURRENT_SOURCE_DIR
}
/src/ale.cpp
${
CMAKE_CURRENT_SOURCE_DIR
}
/src/Rotation.cpp
)
${
CMAKE_CURRENT_SOURCE_DIR
}
/src/Rotation.cpp
)
# Alias a scoped target for safer linking in downstream projects
set
(
ALE_BUILD_INCLUDE_DIR
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/include/"
)
set
(
ALE_HEADERS
"include/ale.h, include/Rotation.h"
)
set
(
ALE_HEADERS
"
${
ALE_BUILD_INCLUDE_DIR
}
/ale.h"
"
${
ALE_BUILD_INCLUDE_DIR
}
/Rotation.h"
)
set
(
ALE_INSTALL_INCLUDE_DIR
"include/ale"
)
set_target_properties
(
ale PROPERTIES
set_target_properties
(
ale PROPERTIES
VERSION
${
PROJECT_VERSION
}
VERSION
${
PROJECT_VERSION
}
SOVERSION 0
SOVERSION 0
)
PUBLIC_HEADER
${
ALE_HEADERS
}
)
# Use generator expressions so that downstream projects can use this target
# Use generator expressions so that downstream projects can use this target
target_include_directories
(
ale
target_include_directories
(
ale
PUBLIC
PUBLIC
$<BUILD_INTERFACE:
${
CMAKE_CURRENT_SOURCE_DIR
}
/include
>
$<BUILD_INTERFACE:
${
ALE_BUILD_INCLUDE_DIR
}
>
$<INSTALL_INTERFACE:include>
)
$<INSTALL_INTERFACE:include>
)
target_link_libraries
(
ale
target_link_libraries
(
ale
...
@@ -73,11 +74,14 @@ configure_file(cmake/config.cmake.in
...
@@ -73,11 +74,14 @@ configure_file(cmake/config.cmake.in
install
(
FILES
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
PROJECT_NAME
}
-config.cmake
install
(
FILES
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
PROJECT_NAME
}
-config.cmake
DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
/cmake/
${
PROJECT_NAME
}
)
DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
/cmake/
${
PROJECT_NAME
}
)
# Install the headers
install
(
FILES
${
ALE_HEADERS
}
DESTINATION
${
ALE_INSTALL_INCLUDE_DIR
}
)
# Install the library
# Install the library
install
(
TARGETS ale
install
(
TARGETS ale
EXPORT aleTargets
EXPORT aleTargets
LIBRARY DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
LIBRARY DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
PUBLIC_HEA
DE
R
DESTINATION
${
CMAK
E_INSTALL_INCLUDEDIR
}
)
INCLU
DE
S
DESTINATION
${
AL
E_INSTALL_INCLUDE
_
DIR
}
)
# Install the target
# Install the target
install
(
EXPORT aleTargets
install
(
EXPORT aleTargets
...
...
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