123456789101112131415161718192021222324 |
- #
- # Copyright (c) Contributors to the Open 3D Engine Project.
- # For complete copyright and license terms please see the LICENSE at the root of this distribution.
- #
- # SPDX-License-Identifier: Apache-2.0 OR MIT
- #
- # this file actually ingests the library and defines targets.
- set(TARGET_WITH_NAMESPACE "3rdParty::pybind11")
- if (TARGET ${TARGET_WITH_NAMESPACE})
- return()
- endif()
- set(LIB_NAME "pybind11")
- set(${LIB_NAME}_INCLUDE_DIR ${CMAKE_CURRENT_LIST_DIR}/pybind11/include)
- add_library(${TARGET_WITH_NAMESPACE} INTERFACE IMPORTED GLOBAL)
- ly_target_include_system_directories(TARGET ${TARGET_WITH_NAMESPACE} INTERFACE ${${LIB_NAME}_INCLUDE_DIR})
- if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
- target_compile_options(3rdParty::pybind11 INTERFACE -fsized-deallocation)
- endif()
- set(${LIB_NAME}_FOUND True)
|