Skip to content

Commit

Permalink
[cmake] Standardise install tree for windows build (HaxeFoundation#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 authored and notGlassySundew committed Nov 23, 2024
1 parent 066536b commit 3e40182
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 3e40182

Please sign in to comment.