Skip to content

Commit

Permalink
Bugfix/setup cmake variables python wheel (#16)
Browse files Browse the repository at this point in the history
* Fix condition

Signed-off-by: Andreas Heinrich <[email protected]>

* Improve status messages

Signed-off-by: Andreas Heinrich <[email protected]>

---------

Signed-off-by: Andreas Heinrich <[email protected]>
  • Loading branch information
andistorm authored Oct 29, 2024
1 parent 1e22574 commit 6ac5e03
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python-package-helpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -274,12 +274,12 @@ endfunction()
macro(ev_setup_cmake_variables_python_wheel)
set(${PROJECT_NAME}_WHEEL_INSTALL_PREFIX "" CACHE PATH "Path to install python wheels to")
if (${PROJECT_NAME}_WHEEL_INSTALL_PREFIX STREQUAL "")
if(${WHEEL_INSTALL_PREFIX})
if(NOT ${WHEEL_INSTALL_PREFIX} STREQUAL "")
set(${PROJECT_NAME}_DEFAULT_WHEEL_INSTALL_PREFIX "${WHEEL_INSTALL_PREFIX}")
message(STATUS "${PROJET_NAME}_WHEEL_INSTALL_PREFIX not set, using default: WHEEL_INSTALL_PREFIX=${${PROJECT_NAME}_DEFAULT_WHEEL_INSTALL_PREFIX}")
message(STATUS "${PROJECT_NAME}_WHEEL_INSTALL_PREFIX not set, using: WHEEL_INSTALL_PREFIX=${${PROJECT_NAME}_DEFAULT_WHEEL_INSTALL_PREFIX}")
else()
set(${PROJECT_NAME}_DEFAULT_WHEEL_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/../dist-wheels")
message(STATUS "${PROJECT_NAME}_WHEEL_INSTALL_PREFIX not set, using default: \${CMAKE_INSTALL_PREFIX}/../dist-wheels=${${PROJECT_NAME}_DEFAULT_WHEEL_INSTALL_PREFIX}")
message(STATUS "${PROJECT_NAME}_WHEEL_INSTALL_PREFIX and WHEEL_INSTALL_PREFIX not set, using default: \${CMAKE_INSTALL_PREFIX}/../dist-wheels=${${PROJECT_NAME}_DEFAULT_WHEEL_INSTALL_PREFIX}")
endif()
set(${PROJECT_NAME}_WHEEL_INSTALL_PREFIX "${${PROJECT_NAME}_DEFAULT_WHEEL_INSTALL_PREFIX}" CACHE PATH "Path to install python wheels to" FORCE)
endif()
Expand Down

0 comments on commit 6ac5e03

Please sign in to comment.