Skip to content

Commit 339fdf3

Browse files
committed
Update
1 parent 740bce1 commit 339fdf3

File tree

5 files changed

+138
-119
lines changed

5 files changed

+138
-119
lines changed

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,9 @@ if(BUILD_ONE_LIB)
146146
else(CUDA_FOUND)
147147
# dynamic; w/o cuda
148148
add_library(${targetLibraryName} SHARED ${ug4libSources})
149-
install(TARGETS ${targetLibraryName}
150-
ARCHIVE
151-
DESTINATION lib)
149+
install(TARGETS ${targetLibraryName}
150+
LIBRARY DESTINATION lib
151+
COMPONENT libraries)
152152
endif(CUDA_FOUND)
153153
#ug_add_library(${targetLibraryName} SHARED ${ug4libSources})
154154

cmake/cpack/rpm-config.cmake

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1-
# Configuration for RPMs
2-
CPACK_RPM_PACKAGE_SUMMARY("This is UG4.")
1+
# Configuration for RPMs
2+
SET (CPACK_RPM_PACKAGE_SUMMARY,"This is UG4.")
3+
SET(CPACK_RPM_PACKAGE_NAME, "ug4")
4+
SET(CPACK_RPM_PACKAGE_RELOCATABLE,TRUE)
5+

cmake/ug_cpack_config.cmake

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,24 @@
3232
# This file is used for cpack configuration.
3333
set(CPACK_PACKAGE_NAME "UG4")
3434
set(CPACK_PACKAGE_HOMEPAGE_URL "https://github.com/UG4")
35+
set(CPACK_PACKAGE_VENDOR "TheUG4Group")
36+
set(CPACK_PACKAGE_CONTACT "ug4@uni-frankfurt.de")
37+
set(CPACK_PACKAGE_CHECKSUM SHA256)
3538

39+
# make DESTDIR=/home/xyz install
40+
set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/ug4")
41+
42+
#include(cmake/cpack/zip-config.cmake) # Create ZIP (generic)
3643
#include(cmake/cpack/nuget-config.cmake)
3744
#include(cmake/cpack/osx-config.cmake)
3845
#include(cmake/cpack/rpm-config.cmake)
39-
include(cmake/cpack/zip-config.cmake) # Create ZIP (generic)
46+
include(cmake/cpack/deb-config.cmake)
4047

41-
set(CPACK_GENERATOR "ZIP") # Override?
48+
# We can select a generator using cpack -G
49+
# set(CPACK_GENERATOR "DEB") # Override? # ZIP, DEB
50+
include(CPack)
4251

43-
include(CPack)
52+
# These are the 'component' categories used (extend, if neccessary!)
53+
cpack_add_component(applications DISPLAY_NAME "Executables")
54+
cpack_add_component(libraries DISPLAY_NAME "Libraries")
55+
cpack_add_component(sources DISPLAY_NAME "Sources")

ugbase/compile_info/CMakeLists.txt

Lines changed: 108 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -1,107 +1,108 @@
1-
# Copyright (c) 2012-2013: G-CSC, Goethe University Frankfurt
2-
# Author: Sebastian Reiter
3-
#
4-
# This file is part of UG4.
5-
#
6-
# UG4 is free software: you can redistribute it and/or modify it under the
7-
# terms of the GNU Lesser General Public License version 3 (as published by the
8-
# Free Software Foundation) with the following additional attribution
9-
# requirements (according to LGPL/GPL v3 §7):
10-
#
11-
# (1) The following notice must be displayed in the Appropriate Legal Notices
12-
# of covered and combined works: "Based on UG4 (www.ug4.org/license)".
13-
#
14-
# (2) The following notice must be displayed at a prominent place in the
15-
# terminal output of covered works: "Based on UG4 (www.ug4.org/license)".
16-
#
17-
# (3) The following bibliography is recommended for citation and must be
18-
# preserved in all covered files:
19-
# "Reiter, S., Vogel, A., Heppner, I., Rupp, M., and Wittum, G. A massively
20-
# parallel geometric multigrid solver on hierarchically distributed grids.
21-
# Computing and visualization in science 16, 4 (2013), 151-164"
22-
# "Vogel, A., Reiter, S., Rupp, M., Nägel, A., and Wittum, G. UG4 -- a novel
23-
# flexible software system for simulating pde based models on high performance
24-
# computers. Computing and visualization in science 16, 4 (2013), 165-179"
25-
#
26-
# This program is distributed in the hope that it will be useful,
27-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
28-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29-
# GNU Lesser General Public License for more details.
30-
31-
cmake_minimum_required(VERSION 2.8.12)
32-
33-
################################################
34-
# ug4 - compile-info
35-
################################################
36-
37-
project(P_UG4_COMPILE_INFO)
38-
39-
# set global output paths for UG4
40-
# They are relative to the source dir for which cmake was executed.
41-
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/lib)
42-
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/lib)
43-
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
44-
45-
include("${UG_ROOT_CMAKE_PATH}/ug_includes.cmake")
46-
47-
# Name of the file that will contain the compile-info variables
48-
set(infoFileName ${CMAKE_BINARY_DIR}/compile_info_vars.cpp)
49-
50-
# we write this file to make sure that it exists...
51-
# Note that on UNIX systems the file is updated with each build through
52-
# the add_custom_build_target and add_custom_command calls below.
53-
# on windows we currently don't support updated compile-infos.
54-
# check out, whether this can be improved using special windows-scripting...
55-
56-
#set(infoFileFound "infoFileFound-NOTFOUND")
57-
#find_file(infoFileFound compile_info_vars.cpp PATHS ${CMAKE_BINARY_DIR})
58-
59-
#if(${infoFileFound} STREQUAL "infoFileFound-NOTFOUND")
60-
file(WRITE ${infoFileName}
61-
"namespace ug\n"
62-
"{\n"
63-
"const char *UG_SVN_REVISION=\"UNKNOWN\";\n"
64-
"const char *UG_GIT_REVISION=\"UNKNOWN\";\n"
65-
"const char *UG_BUILD_HOST=\"UNKNOWN\";\n"
66-
"const char *UG_COMPILE_DATE=\"UNKNOWN\";\n"
67-
"}\n")
68-
#endif(${infoFileFound} STREQUAL "infoFileFound-NOTFOUND")
69-
70-
if(UNIX AND buildCompileInfo)
71-
# The custom target is always considered out of date and will be rebuilt
72-
# every time make is executed.
73-
add_custom_target(updateCompileInfo)
74-
# The build of the custom target triggers this custom command, which updates
75-
# the compile_info.cpp file.
76-
add_custom_command(TARGET updateCompileInfo PRE_BUILD COMMAND bash ${UG_ROOT_PATH}/ugcore/scripts/shell/generate_compile_info ${UG_ROOT_PATH} ${infoFileName})
77-
endif(UNIX AND buildCompileInfo)
78-
79-
# Export sources to the file which contains the info-access-methods.
80-
# Note that this is not the auto-generated file which contains
81-
# the actual variable definitions.
82-
EXPORTSOURCES(ugbase/compile_info compile_info.cpp)
83-
84-
if(buildEmbeddedPlugins OR NOT buildCompileInfo)
85-
EXPORTSOURCES("" ${infoFileName})
86-
# Note that a dependency to updateCompileInfo is created in the main CMakeLists.txt
87-
# file for this case.
88-
89-
else(buildEmbeddedPlugins OR NOT buildCompileInfo)
90-
if(buildDynamicLib)
91-
add_library(CompileInfo SHARED ${infoFileName})
92-
set(compileInfoLibName CompileInfo)
93-
install(TARGETS ${compileInfoLibName}
94-
LIBRARY
95-
DESTINATION lib)
96-
else(buildDynamicLib)
97-
# no dynamic lib
98-
add_library(CompileInfo_s STATIC ${infoFileName})
99-
set(compileInfoLibName CompileInfo_s)
100-
endif(buildDynamicLib)
101-
102-
if(UNIX AND buildCompileInfo)
103-
# The dependency makes sure, that the compile_info file is written before
104-
# the CompileInfo lib is being rebuilt.
105-
add_dependencies(${compileInfoLibName} updateCompileInfo)
106-
endif(UNIX AND buildCompileInfo)
107-
endif(buildEmbeddedPlugins OR NOT buildCompileInfo)
1+
# Copyright (c) 2012-2013: G-CSC, Goethe University Frankfurt
2+
# Author: Sebastian Reiter
3+
#
4+
# This file is part of UG4.
5+
#
6+
# UG4 is free software: you can redistribute it and/or modify it under the
7+
# terms of the GNU Lesser General Public License version 3 (as published by the
8+
# Free Software Foundation) with the following additional attribution
9+
# requirements (according to LGPL/GPL v3 §7):
10+
#
11+
# (1) The following notice must be displayed in the Appropriate Legal Notices
12+
# of covered and combined works: "Based on UG4 (www.ug4.org/license)".
13+
#
14+
# (2) The following notice must be displayed at a prominent place in the
15+
# terminal output of covered works: "Based on UG4 (www.ug4.org/license)".
16+
#
17+
# (3) The following bibliography is recommended for citation and must be
18+
# preserved in all covered files:
19+
# "Reiter, S., Vogel, A., Heppner, I., Rupp, M., and Wittum, G. A massively
20+
# parallel geometric multigrid solver on hierarchically distributed grids.
21+
# Computing and visualization in science 16, 4 (2013), 151-164"
22+
# "Vogel, A., Reiter, S., Rupp, M., Nägel, A., and Wittum, G. UG4 -- a novel
23+
# flexible software system for simulating pde based models on high performance
24+
# computers. Computing and visualization in science 16, 4 (2013), 165-179"
25+
#
26+
# This program is distributed in the hope that it will be useful,
27+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
28+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29+
# GNU Lesser General Public License for more details.
30+
31+
cmake_minimum_required(VERSION 2.8.12)
32+
33+
################################################
34+
# ug4 - compile-info
35+
################################################
36+
37+
project(P_UG4_COMPILE_INFO)
38+
39+
# set global output paths for UG4
40+
# They are relative to the source dir for which cmake was executed.
41+
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/lib)
42+
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/lib)
43+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
44+
45+
include("${UG_ROOT_CMAKE_PATH}/ug_includes.cmake")
46+
47+
# Name of the file that will contain the compile-info variables
48+
set(infoFileName ${CMAKE_BINARY_DIR}/compile_info_vars.cpp)
49+
50+
# we write this file to make sure that it exists...
51+
# Note that on UNIX systems the file is updated with each build through
52+
# the add_custom_build_target and add_custom_command calls below.
53+
# on windows we currently don't support updated compile-infos.
54+
# check out, whether this can be improved using special windows-scripting...
55+
56+
#set(infoFileFound "infoFileFound-NOTFOUND")
57+
#find_file(infoFileFound compile_info_vars.cpp PATHS ${CMAKE_BINARY_DIR})
58+
59+
#if(${infoFileFound} STREQUAL "infoFileFound-NOTFOUND")
60+
file(WRITE ${infoFileName}
61+
"namespace ug\n"
62+
"{\n"
63+
"const char *UG_SVN_REVISION=\"UNKNOWN\";\n"
64+
"const char *UG_GIT_REVISION=\"UNKNOWN\";\n"
65+
"const char *UG_BUILD_HOST=\"UNKNOWN\";\n"
66+
"const char *UG_COMPILE_DATE=\"UNKNOWN\";\n"
67+
"}\n")
68+
#endif(${infoFileFound} STREQUAL "infoFileFound-NOTFOUND")
69+
70+
if(UNIX AND buildCompileInfo)
71+
# The custom target is always considered out of date and will be rebuilt
72+
# every time make is executed.
73+
add_custom_target(updateCompileInfo)
74+
# The build of the custom target triggers this custom command, which updates
75+
# the compile_info.cpp file.
76+
add_custom_command(TARGET updateCompileInfo PRE_BUILD COMMAND bash ${UG_ROOT_PATH}/ugcore/scripts/shell/generate_compile_info ${UG_ROOT_PATH} ${infoFileName})
77+
endif(UNIX AND buildCompileInfo)
78+
79+
# Export sources to the file which contains the info-access-methods.
80+
# Note that this is not the auto-generated file which contains
81+
# the actual variable definitions.
82+
EXPORTSOURCES(ugbase/compile_info compile_info.cpp)
83+
84+
if(buildEmbeddedPlugins OR NOT buildCompileInfo)
85+
EXPORTSOURCES("" ${infoFileName})
86+
# Note that a dependency to updateCompileInfo is created in the main CMakeLists.txt
87+
# file for this case.
88+
89+
else(buildEmbeddedPlugins OR NOT buildCompileInfo)
90+
if(buildDynamicLib)
91+
# dynamic lib
92+
add_library(CompileInfo SHARED ${infoFileName})
93+
set(compileInfoLibName CompileInfo)
94+
install(TARGETS ${compileInfoLibName}
95+
LIBRARY DESTINATION lib
96+
COMPONENT libraries)
97+
else(buildDynamicLib)
98+
# static lib
99+
add_library(CompileInfo_s STATIC ${infoFileName})
100+
set(compileInfoLibName CompileInfo_s)
101+
endif(buildDynamicLib)
102+
103+
if(UNIX AND buildCompileInfo)
104+
# The dependency makes sure, that the compile_info file is written before
105+
# the CompileInfo lib is being rebuilt.
106+
add_dependencies(${compileInfoLibName} updateCompileInfo)
107+
endif(UNIX AND buildCompileInfo)
108+
endif(buildEmbeddedPlugins OR NOT buildCompileInfo)

ugbase/ug_shell/CMakeLists.txt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,12 @@ else(STATIC_BUILD)
199199
endif(STATIC_BUILD)
200200

201201

202-
# CPack specifics
202+
# CPack specific
203+
#set_target_properties(${targetExecutableName} PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE)
204+
#set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
203205
install(TARGETS ${targetExecutableName}
204-
RUNTIME
205-
DESTINATION bin)
206-
install(DIRECTORY ${UG_ROOT_PATH}/ugcore/scripts
206+
RUNTIME DESTINATION bin
207+
LIBRARY DESTINATION lib
208+
COMPONENT applications)
209+
install(DIRECTORY ${UG_ROOT_PATH}/ugcore/scripts
207210
DESTINATION ugcore)

0 commit comments

Comments
 (0)