chore: version number via CMakeLists.txt.
This commit is contained in:
parent
ac8c5d9a10
commit
5edce7ec20
@ -1,9 +1,6 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
project(kgg-dec LANGUAGES CXX)
|
||||
|
||||
include(CheckIPOSupported)
|
||||
check_ipo_supported(RESULT lto_supported OUTPUT error)
|
||||
project(kgg-dec VERSION 0.2 LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
@ -27,12 +24,4 @@ target_include_directories(kgg-dec
|
||||
|
||||
target_link_libraries(kgg-dec PRIVATE shell32 ole32)
|
||||
target_compile_definitions(kgg-dec PRIVATE NOMINMAX)
|
||||
|
||||
if (lto_supported)
|
||||
set_property(TARGET kgg-dec PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
|
||||
endif ()
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s -fdata-sections -ffunction-sections -flto -fmerge-all-constants -fno-exceptions -fno-rtti")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -s -Wl,--gc-sections -flto")
|
||||
endif ()
|
||||
target_compile_definitions(kgg-dec PRIVATE KGGDEC_PROJECT_VERSION="${PROJECT_VERSION}")
|
||||
|
@ -84,7 +84,7 @@ int main() {
|
||||
SetConsoleOutputCP(CP_UTF8);
|
||||
setlocale(LC_ALL, ".UTF8");
|
||||
|
||||
fputs("kgg-dec v0.1 by LSR\n", stderr);
|
||||
fprintf(stderr, "kgg-dec v" KGGDEC_PROJECT_VERSION " by LSR\n");
|
||||
fputs(
|
||||
"Usage: kgg-dec "
|
||||
"[--infra-dll infra.dll] "
|
||||
|
Loading…
Reference in New Issue
Block a user