From 98addf9a99788863fe55096eb1c103e07a30b8e0 Mon Sep 17 00:00:00 2001 From: tobil4sk Date: Mon, 9 Sep 2024 09:25:28 +0100 Subject: [PATCH] [cmake] Standardise install tree for windows build (#709) * [cmake] Standardise install tree for windows build For cmake builds using MSVC, it now installs in with the same install tree as the package from the visual studio sln build. This means that the visual studio hlc templates can now also support cmake installs of hashlink. * [cmake] Add default windows install path --- CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 80d7b39ef..cc7de08c4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -347,6 +347,15 @@ endif() set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.md") set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") +if(MSVC) + if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set (CMAKE_INSTALL_PREFIX "C:/HaxeToolkit/hashlink" CACHE PATH "default install path" FORCE) + endif() + + set(CMAKE_INSTALL_BINDIR .) + set(CMAKE_INSTALL_LIBDIR .) +endif() + set(HDLL_DESTINATION ${CMAKE_INSTALL_LIBDIR} )