From dd5bc0e6e67413d4d1f7bd2f8e4fd0711643729f Mon Sep 17 00:00:00 2001 From: Kolan Sh Date: Thu, 16 Jun 2016 16:38:29 +0300 Subject: [PATCH] In progress... --- CMakeLists.txt | 1 - cpack/CMakeLists.txt | 22 +++++++++++++++++++--- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c69d45f..28a1aa6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,7 +53,6 @@ ExternalProject_Add (object-example INSTALL_DIR bundle ) -INSTALL (DIRECTORY ${CMAKE_BINARY_DIR}/bundle DESTINATION "win32") diff --git a/cpack/CMakeLists.txt b/cpack/CMakeLists.txt index ae9379c..c0ca677 100644 --- a/cpack/CMakeLists.txt +++ b/cpack/CMakeLists.txt @@ -4,8 +4,24 @@ SET (WIN32_UNINSTALL_NAME "LAvBundl") # <= 8 symbols for the name SET (CPACK_NSIS_MENU_LINKS "https://redmine.backbone.ws/projects/laview/wiki" "Homepage for ${PROJECT_DESCRIPTION}") -SET (CPACK_PACKAGE_EXECUTABLES "..\\\\win32\\\\bundle\\\\bin\\\\laview-desktop-1;LAview Desktop") -SET (CPACK_NSIS_INSTALLED_ICON_NAME ..\\\\win32\\\\bundle\\\\bin\\\\laview-desktop-1.exe) -SET (CPACK_CREATE_DESKTOP_LINKS "..\\\\win32\\\\bundle\\\\bin\\\\laview-desktop-1") +INCLUDE (CPackDetectArch) +IF (ARCHITECTURE STREQUAL "amd64") + SET (ARCH 64) +ELSE () + SET (ARCH 32) +ENDIF () + +SET (CPACK_PACKAGE_EXECUTABLES "..\\\\win${ARCH}\\\\bundle\\\\bin\\\\laview-desktop-1;LAview Desktop") +SET (CPACK_NSIS_INSTALLED_ICON_NAME ..\\\\win${ARCH}\\\\bundle\\\\bin\\\\laview-desktop-1.exe) +SET (CPACK_CREATE_DESKTOP_LINKS "..\\\\win${ARCH}\\\\bundle\\\\bin\\\\laview-desktop-1") + + +FILE (MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/bundle/bin) + +FOREACH (libname libgio-2.0-0.dll libgmodule-2.0-0.dll libglib-2.0-0.dll) + EXECUTE_PROCESS (COMMAND ln -sf /mingw${ARCH}/bin/${libname} ${CMAKE_BINARY_DIR}/bundle/bin/${libname}) +ENDFOREACH (libname) + +INSTALL (DIRECTORY ${CMAKE_BINARY_DIR}/bundle DESTINATION "win${ARCH}") INCLUDE (CPackCommonRules)