1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2e54997..169e33c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -51,7 +51,7 @@ set(VORPALINE_VERSION_MINOR 7)
set(VORPALINE_VERSION_PATCH 5)
set(VORPALINE_VERSION ${VORPALINE_VERSION_MAJOR}.${VORPALINE_VERSION_MINOR}.${VORPALINE_VERSION_PATCH})
-set(VORPALINE_INCLUDE_SUBPATH geogram${VORPALINE_VERSION_MAJOR})
+set(VORPALINE_INCLUDE_SUBPATH ./)
# Determine the current Build-OS (Build-platform without the compiler info)
string(REGEX REPLACE "-[^-]+$" "" VORPALINE_OS ${VORPALINE_PLATFORM})
@@ -113,6 +113,11 @@ if(GEOGRAM_WITH_VORPALINE)
add_subdirectory(src/lib/vorpalib)
endif()
+# find this library in the outside scope
+if(GEOGRAM_WITH_GRAPHICS)
+ find_package(GLFW3 REQUIRED)
+endif(GEOGRAM_WITH_GRAPHICS)
+
add_subdirectory(src/lib/third_party)
if(GEOGRAM_WITH_GRAPHICS)
@@ -145,8 +150,44 @@ file(REMOVE ${CMAKE_BINARY_DIR}/doc/LICENSE.txt)
# FindGeogram.cmake
+# This installation is not suitable for vcpkg
+# install(FILES cmake/FindGeogram.cmake DESTINATION lib/cmake/modules COMPONENT devkit)
+
+set(config_install_dir "share/geogram")
+set(include_install_dir "include")
+set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated")
+
+# Configuration
+set(version_config "${generated_dir}/${PROJECT_NAME}ConfigVersion.cmake")
+set(project_config "${generated_dir}/${PROJECT_NAME}Config.cmake")
+set(targets_export_name "${PROJECT_NAME}Targets")
+set(namespace "${PROJECT_NAME}::")
+
+# Include module with fuction 'write_basic_package_version_file'
+include(CMakePackageConfigHelpers)
+
+write_basic_package_version_file(
+ "${version_config}" COMPATIBILITY SameMajorVersion VERSION ${VORPALINE_VERSION}
+)
+
+configure_package_config_file(
+ "cmake/Config.cmake.in"
+ "${project_config}"
+ INSTALL_DESTINATION "${config_install_dir}"
+)
-install(FILES cmake/FindGeogram.cmake DESTINATION lib/cmake/modules COMPONENT devkit)
+# Config
+install(
+ FILES "${project_config}" "${version_config}"
+ DESTINATION "${config_install_dir}"
+)
+
+# Config
+install(
+ EXPORT "${targets_export_name}"
+ NAMESPACE "${namespace}"
+ DESTINATION "${config_install_dir}"
+)
# Configure CPack
diff --git a/src/lib/geogram/CMakeLists.txt b/src/lib/geogram/CMakeLists.txt
index 49cb2ba..82c2f39 100755
--- a/src/lib/geogram/CMakeLists.txt
+++ b/src/lib/geogram/CMakeLists.txt
@@ -62,7 +62,14 @@ if(WIN32)
endif()
# Install the library
-install_devkit_targets(geogram)
+install(
+ TARGETS geogram
+ EXPORT "${PROJECT_NAME}Targets"
+ LIBRARY DESTINATION "lib"
+ ARCHIVE DESTINATION "lib"
+ RUNTIME DESTINATION "bin"
+ INCLUDES DESTINATION "include"
+)
# Install include files for the standard devkit
install(
diff --git a/src/lib/geogram_gfx/CMakeLists.txt b/src/lib/geogram_gfx/CMakeLists.txt
index b155975..ad66440 100755
--- a/src/lib/geogram_gfx/CMakeLists.txt
+++ b/src/lib/geogram_gfx/CMakeLists.txt
@@ -47,14 +47,21 @@ if(VORPALINE_BUILD_DYNAMIC)
endif()
# Install the library
-install_devkit_targets(geogram_gfx)
+install(
+ TARGETS geogram_gfx
+ EXPORT "${PROJECT_NAME}Targets"
+ LIBRARY DESTINATION "lib"
+ ARCHIVE DESTINATION "lib"
+ RUNTIME DESTINATION "bin"
+ INCLUDES DESTINATION "include"
+)
# Install include files for the standard devkit
install(
DIRECTORY .
DESTINATION include/${VORPALINE_INCLUDE_SUBPATH}/geogram_gfx
COMPONENT devkit
- FILES_MATCHING PATTERN *.h
+ FILES_MATCHING PATTERN *.h PATTERN *.xpm # xpm is the colrbar file
)
# Install include files for the full devkit
@@ -62,7 +69,7 @@ install(
DIRECTORY .
DESTINATION include/${VORPALINE_INCLUDE_SUBPATH}/geogram_gfx
COMPONENT devkit-full
- FILES_MATCHING PATTERN *.h
+ FILES_MATCHING PATTERN *.h PATTERN *.xpm # xpm is the colrbar file
)
install(
diff --git a/src/lib/third_party/numerics/CMakeLists.txt b/src/lib/third_party/numerics/CMakeLists.txt
index c9c3a6e..f16d7ec 100644
--- a/src/lib/third_party/numerics/CMakeLists.txt
+++ b/src/lib/third_party/numerics/CMakeLists.txt
@@ -10,16 +10,19 @@ endif()
include_directories(${GEOGRAM_SOURCE_DIR}/src/lib/third_party/numerics/INCLUDE)
+set(LAPACK_lapack_WORKS TRUE)
+find_package(BLAS REQUIRED)
+find_package(LAPACK REQUIRED)
aux_source_directories(SOURCES "Source Files" .)
aux_source_directories(SOURCES "Source Files\\LIBF2C" LIBF2C)
-aux_source_directories(SOURCES "Source Files\\CBLAS" CBLAS)
-aux_source_directories(SOURCES "Source Files\\CLAPACK" CLAPACK)
+# aux_source_directories(SOURCES "Source Files\\CBLAS" CBLAS)
+# aux_source_directories(SOURCES "Source Files\\CLAPACK" CLAPACK)
aux_source_directories(SOURCES "Source Files\\SUPERLU" SUPERLU)
aux_source_directories(SOURCES "Source Files\\ARPACK" ARPACK)
aux_source_directories(SOURCES "Source Files\\ARPACK_UTIL" ARPACK_UTIL)
add_library(geogram_num_3rdparty ${SOURCES})
-
+target_link_libraries(geogram_num_3rdparty ${BLAS_LIBRARIES} ${LAPACK_LIBRARIES})
if(UNIX)
target_link_libraries(geogram_num_3rdparty m)
endif()
diff --git a/src/lib/third_party/numerics/LIBF2C/getarg_.c b/src/lib/third_party/numerics/LIBF2C/getarg_.c
index 2b69a1e..1cde8b6 100755
--- a/src/lib/third_party/numerics/LIBF2C/getarg_.c
+++ b/src/lib/third_party/numerics/LIBF2C/getarg_.c
@@ -17,20 +17,20 @@ VOID getarg_(n, s, ls) ftnint *n; char *s; ftnlen ls;
void getarg_(ftnint *n, char *s, ftnlen ls)
#endif
{
- extern int xargc;
- extern char **xargv;
- Const char *t;
- int i;
-
- if(*n>=0 && *n<xargc)
- t = xargv[*n];
- else
- t = "";
- for(i = 0; i<ls && *t!='\0' ; ++i)
- *s++ = *t++;
- for( ; i<ls ; ++i)
- *s++ = ' ';
- }
+ // extern int xargc;
+ // extern char **xargv;
+ // Const char *t;
+ // int i;
+ //
+ // if(*n>=0 && *n<xargc)
+ // t = xargv[*n];
+ // else
+ // t = "";
+ // for(i = 0; i<ls && *t!='\0' ; ++i)
+ // *s++ = *t++;
+ // for( ; i<ls ; ++i)
+ // *s++ = ' ';
+}
#ifdef __cplusplus
}
#endif
diff --git a/src/lib/third_party/numerics/LIBF2C/iargc_.c b/src/lib/third_party/numerics/LIBF2C/iargc_.c
index 2f29da0..50b00de 100755
--- a/src/lib/third_party/numerics/LIBF2C/iargc_.c
+++ b/src/lib/third_party/numerics/LIBF2C/iargc_.c
@@ -9,8 +9,9 @@ ftnint iargc_()
ftnint iargc_(void)
#endif
{
-extern int xargc;
-return ( xargc - 1 );
+// extern int xargc;
+// return ( xargc - 1 );
+return -1;
}
#ifdef __cplusplus
}
|