From 789ee7e9c2ffa84f34b1287b728351f32806a6a1 Mon Sep 17 00:00:00 2001 From: Username404 Date: Sat, 13 Mar 2021 18:53:11 +0100 Subject: [PATCH] Set the icon's name back to Yerbacon.png, and use PROJECT_NAME for a few file names in CMakeLists.txt. --- CMakeLists.txt | 10 +++++----- resources/{icon.ico => Yerbacon.ico} | Bin 2 files changed, 5 insertions(+), 5 deletions(-) rename resources/{icon.ico => Yerbacon.ico} (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 312097d..36143cc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,8 +9,8 @@ if (NOT DEFINED CODENAME) endif () endif() -file(COPY "resources/Yerbacon.manifest" "resources/icon.ico" DESTINATION "processed") -configure_file("resources/Yerbacon.rc" "processed/Yerbacon.rc" @ONLY) +file(COPY "resources/${PROJECT_NAME}.manifest" "resources/${PROJECT_NAME}.ico" DESTINATION "processed") +configure_file("resources/${PROJECT_NAME}.rc" "processed/${PROJECT_NAME}.rc" @ONLY) set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) @@ -59,7 +59,7 @@ set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${CMAKE_PROJECT_VERSION}-${TIME}") set(CPACK_STRIP_FILES TRUE) include_directories(${CMAKE_CURRENT_LIST_DIR}) -add_executable(${EXENAME} src/main.cpp ${CMAKE_CURRENT_BINARY_DIR}/processed/Yerbacon.rc src/parser/MainParse.cpp src/transpiler/MainTranspile.cpp src/etc/filefuncs.cpp src/etc/lexer.cpp src/headers/lex.hpp src/headers/misc.hpp src/headers/parsing/ParseComponents.hpp src/headers/parsing/StandardComponents.hpp) +add_executable(${EXENAME} src/main.cpp ${CMAKE_CURRENT_BINARY_DIR}/processed/${PROJECT_NAME}.rc src/parser/MainParse.cpp src/transpiler/MainTranspile.cpp src/etc/filefuncs.cpp src/etc/lexer.cpp src/headers/lex.hpp src/headers/misc.hpp src/headers/parsing/ParseComponents.hpp src/headers/parsing/StandardComponents.hpp) target_compile_definitions(ybcon PRIVATE YBCON_VERSION="${CODENAME} ${PROJECT_VERSION}") # lpkg = linux package, wpkg = windows package @@ -102,8 +102,8 @@ if (UNIX AND NOT MINGW) elseif(MINGW OR MSVC) set(CMAKE_EXE_LINKER_FLAGS "-static -static-libstdc++ ${CMAKE_EXE_LINKER_FLAGS}") set(CPACK_PACKAGE_FILE_NAME "${PNAME}_wpkg") - set(CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_SOURCE_DIR}/resources/icon.ico") - set(CPACK_NSIS_MUI_UNIICON "${CMAKE_CURRENT_SOURCE_DIR}/resources/icon.ico") + set(CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_SOURCE_DIR}/resources/${PROJECT_NAME}.ico") + set(CPACK_NSIS_MUI_UNIICON "${CMAKE_CURRENT_SOURCE_DIR}/resources/${PROJECT_NAME}.ico") set(CPACK_NSIS_DEFINES "RequestExecutionLevel highest") set(CPACK_SYSTEM_NAME "Win32-${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}") set(CPACK_TOPLEVEL_TAG "Win32-${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}") diff --git a/resources/icon.ico b/resources/Yerbacon.ico similarity index 100% rename from resources/icon.ico rename to resources/Yerbacon.ico