Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
centrality
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
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
Oleksii Lubynets
centrality
Commits
7accc1b6
Unverified
Commit
7accc1b6
authored
4 years ago
by
Evgeny Kashirin
Browse files
Options
Downloads
Patches
Plain Diff
CMake copies headers to the build directory
parent
e6fe0efb
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CMakeLists.txt
+13
-1
13 additions, 1 deletion
CMakeLists.txt
with
13 additions
and
1 deletion
CMakeLists.txt
+
13
−
1
View file @
7accc1b6
cmake_minimum_required
(
VERSION
2.8
)
cmake_minimum_required
(
VERSION
3.5
)
project
(
Centrality
)
project
(
Centrality
)
set
(
CMAKE_MACOSX_RPATH 1
)
set
(
CMAKE_MACOSX_RPATH 1
)
set
(
PROJECT_VERSION 1.0
)
set
(
PROJECT_VERSION 1.0
)
...
@@ -59,6 +59,18 @@ set(PCM_FILE_NAME lib${PROJECT_NAME})
...
@@ -59,6 +59,18 @@ set(PCM_FILE_NAME lib${PROJECT_NAME})
ROOT_GENERATE_DICTIONARY
(
${
DICT_FILE_NAME
}
${
HEADERS
}
LINKDEF src/CentralityLinkDef.h
)
ROOT_GENERATE_DICTIONARY
(
${
DICT_FILE_NAME
}
${
HEADERS
}
LINKDEF src/CentralityLinkDef.h
)
add_library
(
Centrality SHARED
${
SOURCES
}
${
DICT_FILE_NAME
}
)
add_library
(
Centrality SHARED
${
SOURCES
}
${
DICT_FILE_NAME
}
)
target_link_libraries
(
Centrality
${
ROOT_LIBRARIES
}
)
target_link_libraries
(
Centrality
${
ROOT_LIBRARIES
}
)
add_custom_command
(
TARGET Centrality POST_BUILD
COMMAND
${
CMAKE_COMMAND
}
ARGS -E make_directory
${
CMAKE_BINARY_DIR
}
/include/centrality
COMMAND
${
CMAKE_COMMAND
}
ARGS -E copy_if_different
${
HEADERS
}
${
CMAKE_BINARY_DIR
}
/include/centrality/
WORKING_DIRECTORY
${
CMAKE_CURRENT_SOURCE_DIR
}
)
target_include_directories
(
Centrality
PRIVATE
${
CMAKE_CURRENT_SOURCE_DIR
}
/src
PUBLIC
$<BUILD_INTERFACE:
${
CMAKE_BINARY_DIR
}
/include>
$<INSTALL_INTERFACE:include>
)
# Create a main program using the library
# Create a main program using the library
add_executable
(
main main.cpp
)
add_executable
(
main main.cpp
)
...
...
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