Skip to content

Commit

Permalink
[cmake] Standardise install tree for windows build (#709)
Browse files Browse the repository at this point in the history
* [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
  • Loading branch information
tobil4sk committed Sep 9, 2024
1 parent f0609db commit 98addf9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}
)
Expand Down

0 comments on commit 98addf9

Please sign in to comment.