Skip to content

Commit 5772c14

Browse files
authored
Add files via upload
1 parent bea1071 commit 5772c14

File tree

6 files changed

+243
-488
lines changed

6 files changed

+243
-488
lines changed

cpp/bas2txt/CMakeLists.txt

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,29 @@
1-
# Require a reasonably modern version of CMake
21
cmake_minimum_required(VERSION 3.10)
32

4-
# Name your project
5-
project(bas2txt
3+
# Updated project version to 1.0
4+
project(Bas2Txt
65
VERSION 1.0
76
DESCRIPTION "ZX Spectrum BASIC-to-Text Converter"
87
LANGUAGES CXX)
98

10-
# Enforce C++17 standard
119
set(CMAKE_CXX_STANDARD 17)
1210
set(CMAKE_CXX_STANDARD_REQUIRED True)
13-
set(CMAKE_CXX_EXTENSIONS OFF) # Ensures standard C++ without compiler-specific extensions
11+
set(CMAKE_CXX_EXTENSIONS OFF)
1412

15-
# Create the executable from your source files
16-
# Double-check that these exact file names match what is in your folder!
1713
add_executable(bas2txt bas2txt.cpp bas2txt.h)
1814

19-
# Add some helpful compiler warnings to keep the code squeaky clean
15+
# Inject the version into the source code
16+
target_compile_definitions(bas2txt PRIVATE TOOL_VERSION="${PROJECT_VERSION}")
17+
2018
if(MSVC)
2119
target_compile_options(bas2txt PRIVATE /W4)
2220
else()
2321
target_compile_options(bas2txt PRIVATE -Wall -Wextra -Wpedantic)
2422
endif()
2523

26-
# Force static linking for MinGW (Rider on Windows)
27-
# This guarantees your .exe won't complain about missing DLLs!
2824
if(MINGW)
2925
target_link_options(bas2txt PRIVATE "-static")
3026
endif()
27+
28+
# Installation logic
29+
install(TARGETS bas2txt DESTINATION bin)

0 commit comments

Comments
 (0)