Skip to content

Commit a8cf834

Browse files
committed
Trying to solve bugs in msvc related to version library.
1 parent 8fe06ff commit a8cf834

File tree

4 files changed

+45
-7
lines changed

4 files changed

+45
-7
lines changed

source/threading/source/threading.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
const char *threading_print_info()
2626
{
2727
static const char threading_info[] =
28-
"Abstract Data Type Library " METACALL_VERSION "\n"
28+
"Threading Library " METACALL_VERSION "\n"
2929
"Copyright (C) 2016 - 2021 Vicente Eduardo Ferrer Garcia <[email protected]>\n"
3030

3131
#ifdef ADT_STATIC_DEFINE

source/version/CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,16 @@ include(SecurityFlags)
3333
string(TOUPPER ${META_PROJECT_NAME} META_PROJECT_NAME_UPPER)
3434
string(TOLOWER ${META_PROJECT_NAME} META_PROJECT_NAME_LOWER)
3535

36-
set(template_include_path "${CMAKE_CURRENT_SOURCE_DIR}/include/${target}")
37-
38-
set(include_path "${CMAKE_BINARY_DIR}/source/include/${META_PROJECT_NAME_LOWER}")
36+
set(include_path "${CMAKE_CURRENT_SOURCE_DIR}/include/${target}")
37+
set(include_binary_path "${CMAKE_BINARY_DIR}/source/include/${META_PROJECT_NAME_LOWER}")
3938
set(source_path "${CMAKE_CURRENT_SOURCE_DIR}/source")
4039

4140
# Generate version-header
42-
configure_file(${template_include_path}/version.h.in ${include_path}/${META_PROJECT_NAME_LOWER}_version.h)
41+
configure_file(${include_path}/version.h.in ${include_binary_path}/${META_PROJECT_NAME_LOWER}_version.h)
4342

4443
set(headers
45-
${include_path}/${META_PROJECT_NAME_LOWER}_version.h
44+
${include_binary_path}/${META_PROJECT_NAME_LOWER}_version.h
45+
${include_path}/version.h
4646
)
4747

4848
set(sources
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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+
#ifndef VERSION_H
22+
#define VERSION_H 1
23+
24+
#include <version/version_api.h>
25+
26+
#ifdef __cplusplus
27+
extern "C" {
28+
#endif
29+
30+
VERSION_API const char *version_print_info(void);
31+
32+
#ifdef __cplusplus
33+
}
34+
#endif
35+
36+
#endif /* VERSION_H */

source/version/source/version.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@
2020

2121
#include <metacall/metacall_version.h>
2222

23+
#include <version/version.h>
24+
2325
const char *version_print_info()
2426
{
2527
static const char version_info[] =
26-
"Abstract Data Type Library " METACALL_VERSION "\n"
28+
"Version Library " METACALL_VERSION "\n"
2729
"Copyright (C) 2016 - 2021 Vicente Eduardo Ferrer Garcia <[email protected]>\n"
2830

2931
#ifdef ADT_STATIC_DEFINE

0 commit comments

Comments
 (0)