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)
3434string (TOLOWER ${META_PROJECT_NAME} META_PROJECT_NAME_LOWER)
3535
3636set (template_include_path "${CMAKE_CURRENT_SOURCE_DIR} /include/${target} " )
37- set (template_source_path "${CMAKE_CURRENT_SOURCE_DIR} /source" )
3837
3938set (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" )
4140
4241# Generate version-header
4342configure_file (${template_include_path} /version .h.in ${include_path} /${META_PROJECT_NAME_LOWER} _version.h)
@@ -46,6 +45,10 @@ set(headers
4645 ${include_path} /${META_PROJECT_NAME_LOWER} _version.h
4746)
4847
48+ set (sources
49+ ${source_path} /version .c
50+ )
51+
4952# Group source files
5053set (header_group "Header Files (API)" )
5154set (source_group "Source Files" )
@@ -59,6 +62,7 @@ source_group_by_path(${include_path} "\\\\.h$|\\\\.hpp$"
5962# Build library
6063add_library (${target}
6164 ${headers}
65+ ${sources}
6266)
6367
6468# 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 <vic798@gmail.com>
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 <vic798@gmail.com>\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