diff --git a/CMakeLists.txt b/CMakeLists.txt index 4ec29fc..312097d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,6 @@ cmake_minimum_required(VERSION 3.18) project(Yerbacon VERSION 0.0.1 LANGUAGES C CXX) +set(EXENAME "ybcon") if (NOT DEFINED CODENAME) set(CODENAME "Unknown") @@ -8,7 +9,7 @@ if (NOT DEFINED CODENAME) endif () endif() -file(COPY "resources/Yerbacon.manifest" "resources/Yerbacon.ico" DESTINATION "processed") +file(COPY "resources/Yerbacon.manifest" "resources/icon.ico" DESTINATION "processed") configure_file("resources/Yerbacon.rc" "processed/Yerbacon.rc" @ONLY) set(CMAKE_CXX_STANDARD 20) @@ -58,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(ybcon 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/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) target_compile_definitions(ybcon PRIVATE YBCON_VERSION="${CODENAME} ${PROJECT_VERSION}") # lpkg = linux package, wpkg = windows package @@ -101,14 +102,15 @@ 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/Yerbacon.ico") - set(CPACK_NSIS_MUI_UNIICON "${CMAKE_CURRENT_SOURCE_DIR}/resources/Yerbacon.ico") + 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_DEFINES "RequestExecutionLevel highest") set(CPACK_SYSTEM_NAME "Win32-${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}") set(CPACK_TOPLEVEL_TAG "Win32-${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}") set(CPACK_NSIS_MODIFY_PATH ON) set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON) set(CPACK_GENERATOR ZIP;NSIS) + set(CMAKE_INSTALL_PREFIX "C:\\progs\\") install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ybcon.exe DESTINATION bin) endif() include(CPack) \ No newline at end of file diff --git a/resources/Yerbacon.rc b/resources/Yerbacon.rc index 0006e33..0b8e9ca 100644 --- a/resources/Yerbacon.rc +++ b/resources/Yerbacon.rc @@ -1,6 +1,6 @@ -1 24 "Yerbacon.manifest" +1 24 "@PROJECT_NAME@.manifest" -256 ICON "Yerbacon.ico" +256 ICON "@PROJECT_NAME@.ico" 1 VERSIONINFO FILEVERSION @CMAKE_PROJECT_VERSION_MAJOR@,@CMAKE_PROJECT_VERSION_MINOR@,@CMAKE_PROJECT_VERSION_PATCH@,0 @@ -11,12 +11,12 @@ BEGIN BLOCK "040904E4" BEGIN VALUE "CompanyName", "" - VALUE "FileDescription", "The Yerbacon compiler" + VALUE "FileDescription", "@CPACK_PACKAGE_DESCRIPTION_SUMMARY@" VALUE "FileVersion", "@CMAKE_PROJECT_VERSION@.0" - VALUE "InternalName", "Ybcon" + VALUE "InternalName", "@EXENAME@" VALUE "LegalCopyright", "" - VALUE "OriginalName", "ybcon.exe" - VALUE "ProductName", "Yerbacon" + VALUE "OriginalName", "@EXENAME@.exe" + VALUE "ProductName", "@PROJECT_NAME@" VALUE "ProductVersion", "@CODENAME@ @CMAKE_PROJECT_VERSION@.0" END END diff --git a/resources/Yerbacon.ico b/resources/icon.ico similarity index 100% rename from resources/Yerbacon.ico rename to resources/icon.ico