File tree Expand file tree Collapse file tree 2 files changed +44
-2
lines changed Expand file tree Collapse file tree 2 files changed +44
-2
lines changed Original file line number Diff line number Diff line change @@ -34,10 +34,9 @@ string(TOUPPER ${META_PROJECT_NAME} META_PROJECT_NAME_UPPER)
34
34
string (TOLOWER ${META_PROJECT_NAME} META_PROJECT_NAME_LOWER )
35
35
36
36
set (template_include_path "${CMAKE_CURRENT_SOURCE_DIR} /include/${target} " )
37
- set (template_source_path "${CMAKE_CURRENT_SOURCE_DIR} /source" )
38
37
39
38
set (include_path "${CMAKE_BINARY_DIR} /source/include/${META_PROJECT_NAME_LOWER} " )
40
- set (source_path "${CMAKE_BINARY_DIR} /source/ ${META_PROJECT_NAME_LOWER } /source" )
39
+ set (source_path "${CMAKE_CURRENT_SOURCE_DIR } /source" )
41
40
42
41
# Generate version-header
43
42
configure_file (${template_include_path} /version.h.in ${include_path} /${META_PROJECT_NAME_LOWER}_version.h )
@@ -46,6 +45,10 @@ set(headers
46
45
${include_path} /${META_PROJECT_NAME_LOWER}_version.h
47
46
)
48
47
48
+ set (sources
49
+ ${source_path} /version.c
50
+ )
51
+
49
52
# Group source files
50
53
set (header_group "Header Files (API)" )
51
54
set (source_group "Source Files" )
@@ -59,6 +62,7 @@ source_group_by_path(${include_path} "\\\\.h$|\\\\.hpp$"
59
62
# Build library
60
63
add_library (${target}
61
64
${headers}
65
+ ${sources}
62
66
)
63
67
64
68
# Create namespaced alias
Original file line number Diff line number Diff line change
1
+ /*
2
+ * CMake Versioning Utility by Parra Studios
3
+ * A template for generating versioning utilities.
4
+ *
5
+ * Copyright (C) 2016 - 2021 Vicente Eduardo Ferrer Garcia <[email protected] >
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ *
19
+ */
20
+
21
+ #include <metacall/metacall_version.h>
22
+
23
+ const char * version_print_info ()
24
+ {
25
+ static const char version_info [] =
26
+ "Abstract Data Type Library " METACALL_VERSION "\n"
27
+ "Copyright (C) 2016 - 2021 Vicente Eduardo Ferrer Garcia <[email protected] >\n"
28
+
29
+ #ifdef ADT_STATIC_DEFINE
30
+ "Compiled as static library type"
31
+ #else
32
+ "Compiled as shared library type"
33
+ #endif
34
+
35
+ "\n" ;
36
+
37
+ return version_info ;
38
+ }
You can’t perform that action at this time.
0 commit comments