Skip to content

Commit 09e56c2

Browse files
committed
cmake: change default install path for cmake files on Windows
because the search path is also different https://cmake.org/cmake/help/latest/command/find_package.html#config-mode-search-procedure
1 parent 1f11f5f commit 09e56c2

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,13 @@ option(USE_FORTRAN "Build Fortran bindings" OFF)
2525
option(USE_PYTHON "Build Python bindings" OFF)
2626
option(EXTRA_WARNINGS "Set extra warning flags" OFF)
2727
option(USE_WMAIN "(Windows only) take Unicode arguments in gemmi program" ON)
28-
set(GEMMI_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake/gemmi" CACHE STRING
29-
"Install path for gemmi CMake files")
28+
if (WIN32)
29+
set(GEMMI_INSTALL_CMAKEDIR "cmake" CACHE STRING
30+
"Install path for gemmi CMake files")
31+
else()
32+
set(GEMMI_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake/gemmi" CACHE STRING
33+
"Install path for gemmi CMake files")
34+
endif()
3035
option(STRIP_BINARY "Strip symbols from program" OFF)
3136

3237
# uncomment to show compilation times for each compilation unit

0 commit comments

Comments
 (0)