Skip to content

Commit

Permalink
and again
Browse files Browse the repository at this point in the history
  • Loading branch information
wojdyr committed Dec 17, 2023
1 parent 15ab0cb commit d594b49
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,14 @@ if (DEFINED SKBUILD)
c:/Users/runneradmin/AppData/Local/*/gemmi-config.cmake)
message(STATUS "found gemmi configs: ${FOUND_FILES}")
set(CMAKE_FIND_DEBUG_MODE TRUE)
find_package(gemmi 0.6.4 CONFIG REQUIRED
# On Windows, when both gemmi and pybind11 are installed from
# wheels and gemmi can't be found, pybind11 location can helps:
PATHS ${pybind11_INCLUDE_DIRS}/../../../..)
if (WIN32)
# On Windows, when gemmi is installed from wheel, its location is
# hard to find. For now, locate it relatively to pybind11.
message(STATUS "pybind11_INCLUDE_DIR is ${pybind11_INCLUDE_DIR}")
get_filename_component(gemmi_ROOT "${pybind11_INCLUDE_DIR}/../../../.." ABSOLUTE)
message(STATUS "gemmi_ROOT is ${gemmi_ROOT}")
endif()
find_package(gemmi 0.6.4 CONFIG REQUIRED)
set(CMAKE_FIND_DEBUG_MODE FALSE)
else()
set(USE_PYTHON ON CACHE BOOL "" FORCE)
Expand Down

0 comments on commit d594b49

Please sign in to comment.