mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 05:05:11 +00:00
format: include .in files
This commit is contained in:
parent
da803eb0a5
commit
ed6de125c9
@ -27,10 +27,12 @@ repos:
|
||||
exclude: ^(docs/.*|tools/.*)$
|
||||
|
||||
- repo: https://github.com/cheshirekow/cmake-format-precommit
|
||||
rev: v0.6.10
|
||||
rev: v0.6.11
|
||||
hooks:
|
||||
- id: cmake-format
|
||||
additional_dependencies: [pyyaml]
|
||||
types: [file]
|
||||
files: (\.cmake|CMakeLists.txt)(.in)?$
|
||||
|
||||
- repo: local
|
||||
hooks:
|
||||
|
@ -191,7 +191,8 @@ else()
|
||||
find_library(
|
||||
PYTHON_LIBRARY
|
||||
NAMES "python${PYTHON_LIBRARY_SUFFIX}"
|
||||
PATHS ${_PYTHON_LIBS_SEARCH} NO_DEFAULT_PATH)
|
||||
PATHS ${_PYTHON_LIBS_SEARCH}
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
# If all else fails, just set the name/version and let the linker figure out the path.
|
||||
if(NOT PYTHON_LIBRARY)
|
||||
|
@ -10,10 +10,10 @@ foreach(file ${files})
|
||||
message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
|
||||
if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
|
||||
exec_program(
|
||||
"@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
|
||||
"@CMAKE_COMMAND@" ARGS
|
||||
"-E remove \"$ENV{DESTDIR}${file}\""
|
||||
OUTPUT_VARIABLE rm_out
|
||||
RETURN_VALUE rm_retval
|
||||
)
|
||||
RETURN_VALUE rm_retval)
|
||||
if(NOT "${rm_retval}" STREQUAL 0)
|
||||
message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
|
||||
endif()
|
||||
|
@ -72,7 +72,6 @@ set(pybind11_VERSION_TYPE "@pybind11_VERSION_TYPE@")
|
||||
|
||||
check_required_components(pybind11)
|
||||
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/pybind11Tools.cmake")
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
@ -86,15 +85,35 @@ if(NOT TARGET pybind11::pybind11)
|
||||
find_package(PythonLibsNew ${PYBIND11_PYTHON_VERSION} MODULE REQUIRED)
|
||||
list(REMOVE_AT CMAKE_MODULE_PATH -1)
|
||||
|
||||
set_property(TARGET pybind11::pybind11 APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PYTHON_INCLUDE_DIRS})
|
||||
set_property(TARGET pybind11::pybind11 APPEND PROPERTY INTERFACE_SYSTEM_INCLUDE_DIRECTORIES ${PYTHON_INCLUDE_DIRS})
|
||||
set_property(
|
||||
TARGET pybind11::pybind11
|
||||
APPEND
|
||||
PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${PYTHON_INCLUDE_DIRS})
|
||||
set_property(
|
||||
TARGET pybind11::pybind11
|
||||
APPEND
|
||||
PROPERTY INTERFACE_SYSTEM_INCLUDE_DIRECTORIES ${PYTHON_INCLUDE_DIRS})
|
||||
|
||||
set_property(TARGET pybind11::embed APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${PYTHON_LIBRARIES})
|
||||
set_property(TARGET pybind11::module APPEND PROPERTY INTERFACE_LINK_LIBRARIES
|
||||
"$<$<OR:$<PLATFORM_ID:Windows>,$<PLATFORM_ID:Cygwin>>:$<BUILD_INTERFACE:${PYTHON_LIBRARIES}>>")
|
||||
set_property(
|
||||
TARGET pybind11::embed
|
||||
APPEND
|
||||
PROPERTY INTERFACE_LINK_LIBRARIES ${PYTHON_LIBRARIES})
|
||||
set_property(
|
||||
TARGET pybind11::module
|
||||
APPEND
|
||||
PROPERTY
|
||||
INTERFACE_LINK_LIBRARIES
|
||||
"$<$<OR:$<PLATFORM_ID:Windows>,$<PLATFORM_ID:Cygwin>>:$<BUILD_INTERFACE:${PYTHON_LIBRARIES}>>"
|
||||
)
|
||||
|
||||
get_property(_iid TARGET pybind11::pybind11 PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
|
||||
get_property(_ill TARGET pybind11::module PROPERTY INTERFACE_LINK_LIBRARIES)
|
||||
get_property(
|
||||
_iid
|
||||
TARGET pybind11::pybind11
|
||||
PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
|
||||
get_property(
|
||||
_ill
|
||||
TARGET pybind11::module
|
||||
PROPERTY INTERFACE_LINK_LIBRARIES)
|
||||
set(pybind11_INCLUDE_DIRS ${_iid})
|
||||
set(pybind11_LIBRARIES ${_ico} ${_ill})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user