Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Tobias Leibner
dune-common
Commits
babe7bc5
Commit
babe7bc5
authored
12 years ago
by
Markus Blatt
Browse files
Options
Downloads
Patches
Plain Diff
Adapt cmake variables, such that we can use dune-common.pc.in
[[Imported from SVN: r6606]]
parent
57170249
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+15
-7
15 additions, 7 deletions
CMakeLists.txt
cmake/modules/DuneMacros.cmake
+5
-5
5 additions, 5 deletions
cmake/modules/DuneMacros.cmake
dune-common.pc.cmake
+0
-15
0 additions, 15 deletions
dune-common.pc.cmake
with
20 additions
and
27 deletions
CMakeLists.txt
+
15
−
7
View file @
babe7bc5
...
...
@@ -7,11 +7,11 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules")
include
(
DuneMacros
)
dune_module_information
(
${
CMAKE_SOURCE_DIR
}
)
set
(
ProjectName
"
${
DUNE_MOD
ULE
_NAME
}
"
)
set
(
ProjectVersion
"
${
DUNE_VERSION
_STRING
}
"
)
set
(
ProjectName
"
${
DUNE_MOD_NAME
}
"
)
set
(
ProjectVersion
"
${
DUNE_
MOD_
VERSION
}
"
)
set
(
ProjectMaintainerEmail
"
${
DUNE_MAINTAINER
}
"
)
project
(
${
ProjectName
}
C CXX Fortran
)
set
(
DUNE_COMMON_VERSION
"
${
DUNE_VERSION
_STRING
}
"
)
set
(
DUNE_COMMON_VERSION
"
${
DUNE_
MOD_
VERSION
}
"
)
set
(
DUNE_COMMON_VERSION_MAJOR
"
${
DUNE_VERSION_MAJOR
}
"
)
set
(
DUNE_COMMON_VERSION_MINOR
"
${
DUNE_VERSION_MINOR
}
"
)
set
(
DUNE_COMMON_VERSION_REVISION
"
${
DUNE_VERSION_REVISION
}
"
)
...
...
@@ -86,18 +86,26 @@ add_subdirectory("doc")
set
(
CMAKE_FIND_LIBRARY_SUFFIXES
${
_dune_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES
}
)
set
(
prefix
${
CMAKE_INSTALL_PREFIX
}
)
set
(
exec_prefix
"
\$
{prefix}"
)
set
(
libdir
"
\$
{exec_prefix}/lib"
)
set
(
includedir
"
\$
{prefix}/include"
)
set
(
PACKAGE_NAME
${
DUNE_MOD_NAME
}
)
set
(
VERSION
${
DUNE_MOD_VERSION
}
)
set
(
CC
${
CMAKE_C_COMPILER
}
)
set
(
CXX
${
CMAKE_CXX_COMPILER
}
)
configure_file
(
${
PROJECT_SOURCE_DIR
}
/
${
DUNE_MOD
ULE
_NAME
}
.pc.
cmake
${
PROJECT_BINARY_DIR
}
/
${
DUNE_MOD
ULE
_NAME
}
.pc
${
PROJECT_SOURCE_DIR
}
/
${
DUNE_MOD_NAME
}
.pc.
in
${
PROJECT_BINARY_DIR
}
/
${
DUNE_MOD_NAME
}
.pc
@ONLY
)
#install dune.module file
install
(
FILES dune.module DESTINATION lib/dunecontrol/
${
DUNE_MOD
ULE
_NAME
}
)
install
(
FILES dune.module DESTINATION lib/dunecontrol/
${
DUNE_MOD_NAME
}
)
# install pkgconfig file
if
(
PKG_CONFIG_FOUND
)
install
(
FILES
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
DUNE_MOD
ULE
_NAME
}
.pc
install
(
FILES
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
DUNE_MOD_NAME
}
.pc
DESTINATION lib/pkgconfig
)
endif
(
PKG_CONFIG_FOUND
)
# set up CTest
...
...
This diff is collapsed.
Click to expand it.
cmake/modules/DuneMacros.cmake
+
5
−
5
View file @
babe7bc5
...
...
@@ -3,10 +3,10 @@ macro(dune_module_information MODULE_DIR)
file
(
READ
"
${
MODULE_DIR
}
/dune.module"
DUNE_MODULE
)
# find version string
string
(
REGEX REPLACE
".*Version:[ ]*([^
\n
]+).*"
"
\\
1"
DUNE_VERSION
_STRING
"
${
DUNE_MODULE
}
"
)
string
(
REGEX REPLACE
"([0-9]).*"
"
\\
1"
DUNE_VERSION_MAJOR
"
${
DUNE_VERSION
_STRING
}
"
)
string
(
REGEX REPLACE
"[0-9]*
\\
.([0-9]).*"
"
\\
1"
DUNE_VERSION_MINOR
"
${
DUNE_VERSION
_STRING
}
"
)
string
(
REGEX REPLACE
"[0-9]*
\\
.[0-9]*
\\
.([0-9]).*"
"
\\
1"
DUNE_VERSION_REVISION
"
${
DUNE_VERSION
_STRING
}
"
)
string
(
REGEX REPLACE
".*Version:[ ]*([^
\n
]+).*"
"
\\
1"
DUNE_
MOD_
VERSION
"
${
DUNE_MODULE
}
"
)
string
(
REGEX REPLACE
"([0-9]).*"
"
\\
1"
DUNE_VERSION_MAJOR
"
${
DUNE_
MOD_
VERSION
}
"
)
string
(
REGEX REPLACE
"[0-9]*
\\
.([0-9]).*"
"
\\
1"
DUNE_VERSION_MINOR
"
${
DUNE_
MOD_
VERSION
}
"
)
string
(
REGEX REPLACE
"[0-9]*
\\
.[0-9]*
\\
.([0-9]).*"
"
\\
1"
DUNE_VERSION_REVISION
"
${
DUNE_
MOD_
VERSION
}
"
)
# remove false matches in version string
string
(
REGEX MATCH
"[^0-9]"
NON_NUMBER_CHARACTER
"
${
DUNE_VERSION_MINOR
}
"
)
...
...
@@ -19,6 +19,6 @@ macro(dune_module_information MODULE_DIR)
endif
(
NON_NUMBER_CHARACTER
)
# find strings for module name, maintainer
string
(
REGEX REPLACE
".*Module:[ ]*([^
\n
]+).*"
"
\\
1"
DUNE_MOD
ULE
_NAME
"
${
DUNE_MODULE
}
"
)
string
(
REGEX REPLACE
".*Module:[ ]*([^
\n
]+).*"
"
\\
1"
DUNE_MOD_NAME
"
${
DUNE_MODULE
}
"
)
string
(
REGEX REPLACE
".*Maintainer:[ ]*([^
\n
]+).*"
"
\\
1"
DUNE_MAINTAINER
"
${
DUNE_MODULE
}
"
)
endmacro
(
dune_module_information
)
This diff is collapsed.
Click to expand it.
dune-common.pc.cmake
deleted
100644 → 0
+
0
−
15
View file @
57170249
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@/bin
libdir=@CMAKE_INSTALL_PREFIX@/lib
includedir=@CMAKE_INSTALL_PREFIX@/include
CXX=@CMAKE_CXX_COMPILER@
CC=@CMAKE_C_COMPILER@
DEPENDENCIES=@REQUIRES@
Name: @DUNE_MODULE_NAME@
Version: @DUNE_VERSION_STRING@
Description:
Dune
(
Distributed and Unified Numerics Environment
)
common module
URL: http://dune-project.org/
Requires:
${
DEPENDENCIES
}
Libs: -L
${
libdir
}
-ldunecommon
Cflags: -I
${
includedir
}
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