Skip to content

Commit

Permalink
Avoid cmake CMP0026 warning on Win32 by replacing disallowed LOCATION
Browse files Browse the repository at this point in the history
target property
  • Loading branch information
nyalldawson committed Jun 19, 2015
1 parent 9c73a22 commit c391fcd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cmake/SIPMacros.cmake
Expand Up @@ -128,11 +128,10 @@ MACRO(ADD_SIP_PYTHON_MODULE MODULE_NAME MODULE_SIP)
ENDIF (WIN32)

IF(WIN32)
GET_TARGET_PROPERTY(_target_location ${_logical_name} LOCATION)
GET_TARGET_PROPERTY(_runtime_output ${_logical_name} RUNTIME_OUTPUT_DIRECTORY)
ADD_CUSTOM_COMMAND(TARGET ${_logical_name} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E echo "Copying extension ${_child_module_name}"
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${_target_location}" "${_runtime_output}/${_child_module_name}.pyd"
COMMAND ${CMAKE_COMMAND} -E copy_if_different "$<TARGET_FILE:${_logical_name}>" "${_runtime_output}/${_child_module_name}.pyd"
DEPENDS ${_logical_name}
)
ENDIF(WIN32)
Expand Down

0 comments on commit c391fcd

Please sign in to comment.