Add a PREFIXDIR variable to CMakeLists.txt.

This commit is contained in:
Username404 2021-03-13 19:03:56 +01:00
parent bf0c692cd2
commit d24c250dec
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 3 additions and 2 deletions

View File

@ -100,8 +100,9 @@ if (UNIX AND NOT MINGW)
DESTINATION yerbacon/${CMAKE_INSTALL_BINDIR}) DESTINATION yerbacon/${CMAKE_INSTALL_BINDIR})
endif() endif()
elseif(MINGW OR MSVC) elseif(MINGW OR MSVC)
set(CMAKE_INSTALL_PREFIX "C:\\progs\\${PROJECT_NAME}") set(PREFIXDIR "progs\\${PROJECT_NAME}")
set(CPACK_PACKAGING_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}\\") set(CMAKE_INSTALL_PREFIX "C:\\${PREFIXDIR}")
set(CPACK_PACKAGING_INSTALL_PREFIX "${PREFIXDIR}")
set(CMAKE_EXE_LINKER_FLAGS "-static -static-libstdc++ ${CMAKE_EXE_LINKER_FLAGS}") set(CMAKE_EXE_LINKER_FLAGS "-static -static-libstdc++ ${CMAKE_EXE_LINKER_FLAGS}")
set(CPACK_PACKAGE_FILE_NAME "${PNAME}_wpkg") set(CPACK_PACKAGE_FILE_NAME "${PNAME}_wpkg")
set(CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_SOURCE_DIR}/resources/${PROJECT_NAME}.ico") set(CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_SOURCE_DIR}/resources/${PROJECT_NAME}.ico")