|
1 | | -# Copyright (C) 2023 The C++ Plus Project. |
| 1 | +# Copyright (C) 2024 The C++ Plus Project. |
2 | 2 | # This file is part of the cppp-platform library. |
3 | 3 | # |
4 | 4 | # The cppp-platform library is free software; you can redistribute it |
|
14 | 14 | # cppp-platform library; see the file COPYING. |
15 | 15 | # If not, see <http://unlicense.org/>. |
16 | 16 |
|
17 | | -cmake_minimum_required(VERSION 3.12) |
| 17 | +cmake_minimum_required(VERSION 3.10) |
18 | 18 | project(cppp-platform VERSION 1.3.0) |
19 | 19 |
|
20 | | -# Set C++ standard |
21 | | -set(CMAKE_CXX_STANDARD 11) |
22 | | - |
23 | | -# ---------------------------------------------------------------------------------- |
24 | | -# Import build-aux subdirectory. |
25 | | -if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/build-aux") |
26 | | - set(BUILD_AUX "${CMAKE_CURRENT_SOURCE_DIR}/build-aux") |
27 | | - add_subdirectory("${BUILD_AUX}") |
28 | | - message(STATUS "Using '${BUILD_AUX}' for C++ Plus build-aux directory.") |
29 | | -elseif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/../build-aux") |
30 | | - set(BUILD_AUX "${CMAKE_CURRENT_SOURCE_DIR}/../build-aux") |
31 | | -else() |
32 | | - message(FATAL_ERROR "CMake build-aux directory is not exists, try to execute 'setup.cmd' or './setup.sh' to get it.") |
33 | | -endif() |
34 | | -get_filename_component(BUILD_AUX "${BUILD_AUX}" ABSOLUTE) |
35 | | -include("${BUILD_AUX}/cmake/cppp.cmake") |
36 | | -# ---------------------------------------------------------------------------------- |
37 | | - |
38 | 20 | # Read source files |
39 | | -file(READ "${srcdir}/src/architectures.h" ARCHITECTURES) |
40 | | -file(READ "${srcdir}/src/compilers.h" COMPILERS) |
41 | | -file(READ "${srcdir}/src/languagestandards.h" LANGUAGESTANDARDS) |
42 | | -file(READ "${srcdir}/src/platforms.h" PLATFORMS) |
| 21 | +file(READ "${CMAKE_CURRENT_SOURCE_DIR}/src/architectures.h" ARCHITECTURES) |
| 22 | +file(READ "${CMAKE_CURRENT_SOURCE_DIR}/src/compilers.h" COMPILERS) |
| 23 | +file(READ "${CMAKE_CURRENT_SOURCE_DIR}/src/languagestandards.h" LANGUAGESTANDARDS) |
| 24 | +file(READ "${CMAKE_CURRENT_SOURCE_DIR}/src/platforms.h" PLATFORMS) |
43 | 25 |
|
44 | 26 | # Genetate header |
45 | | -configure_file("${srcdir}/include/cppp/cppp-platform.h.in" "${output_includedir}/cppp/cppp-platform.h") |
46 | | - |
47 | | -# Generate header file for install |
48 | | -cppp_nls_autotranslate("${output_includedir}/cppp/cppp-platform.h" "${srcdir}/lang") |
| 27 | +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/include/cppp/cppp-platform.h.in" "${output_includedir}/cppp/cppp-platform.h") |
49 | 28 |
|
50 | 29 | # Install |
51 | 30 | # Includes |
|
0 commit comments