File tree Expand file tree Collapse file tree 6 files changed +243
-488
lines changed
Expand file tree Collapse file tree 6 files changed +243
-488
lines changed Original file line number Diff line number Diff line change 1- # Require a reasonably modern version of CMake
21cmake_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
119set (CMAKE_CXX_STANDARD 17)
1210set (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!
1713add_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+
2018if (MSVC )
2119 target_compile_options (bas2txt PRIVATE /W4 )
2220else ()
2321 target_compile_options (bas2txt PRIVATE -Wall -Wextra -Wpedantic )
2422endif ()
2523
26- # Force static linking for MinGW (Rider on Windows)
27- # This guarantees your .exe won't complain about missing DLLs!
2824if (MINGW)
2925 target_link_options (bas2txt PRIVATE "-static" )
3026endif ()
27+
28+ # Installation logic
29+ install (TARGETS bas2txt DESTINATION bin)
You can’t perform that action at this time.
0 commit comments