Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dune-copasi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
COPASI
dune-copasi
Commits
67f4cede
Commit
67f4cede
authored
4 years ago
by
Santiago Ospina De Los Ríos
Browse files
Options
Downloads
Patches
Plain Diff
Populate my own target instaed of using ghc_filesystem
parent
411e8660
No related branches found
No related tags found
1 merge request
!49
Resolve "Finish installation and usage instruction on the documentation"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/CMakeLists.txt
+15
-5
15 additions, 5 deletions
lib/CMakeLists.txt
with
15 additions
and
5 deletions
lib/CMakeLists.txt
+
15
−
5
View file @
67f4cede
...
...
@@ -51,9 +51,12 @@ if(DUNE_COPASI_MD_LIBRARY)
endif
()
# Set up filesystem
add_library
(
filesystem INTERFACE
)
list
(
APPEND EXPORTED_DEVELOPMENT_TARGETS filesystem
)
if
(
Filesystem_FOUND
)
# file system is supported, link and we are done
target_link_libraries
(
dune-copasi PUBLIC
std::filesystem
)
target_link_libraries
(
filesystem INTERFACE
std::filesystem
)
else
()
# ... else, we provide a fallback
include
(
FetchContent
)
...
...
@@ -66,13 +69,20 @@ else()
if
(
NOT ghc_filesystem_POPULATED
)
message
(
"-- Populating GHC Filesystem"
)
FetchContent_Populate
(
ghc_filesystem
)
set
(
GHC_FILESYSTEM_WITH_INSTALL ON
)
add_subdirectory
(
"
${
ghc_filesystem_SOURCE_DIR
}
"
"
${
ghc_filesystem_BINARY_DIR
}
"
)
add_library
(
ghcFilesystem::ghc_filesystem ALIAS ghc_filesystem
)
install
(
DIRECTORY
"
${
ghc_filesystem_SOURCE_DIR
}
/include"
COMPONENT Development
DESTINATION
"
${
CMAKE_INSTALL_INCLUDEDIR
}
"
)
endif
()
target_compile_definitions
(
dune-copasi PUBLIC DUNE_COPASI_USE_FALLBACK_FILESYSTEM
)
target_link_libraries
(
dune-copasi PUBLIC ghcFilesystem::ghc_filesystem
)
target_include_directories
(
filesystem INTERFACE
$<BUILD_INTERFACE:
${
ghc_filesystem_SOURCE_DIR
}
/include>
$<INSTALL_INTERFACE:include>
)
endif
()
# main library consumes filesystem definitions
...
...
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