diff --git a/CMakeLists.txt b/CMakeLists.txt index 43c97c6..76b93c8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,7 +54,8 @@ target_compile_definitions(ybcon PRIVATE YBCON_VERSION="${PROJECT_VERSION}") # lpkg = linux package, wpkg = windows package if (UNIX AND NOT MINGW) include(GNUInstallDirs) - set(CPACK_PACKAGING_INSTALL_PREFIX "/opt") + set(CMAKE_INSTALL_PREFIX "/opt") + set(CPACK_PACKAGING_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}_lpkg") set(CPACK_SYSTEM_NAME "Linux-${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}") set(CPACK_TOPLEVEL_TAG "Linux-${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}")