diff options
author | Dean Moldovan <dean0x7d@gmail.com> | 2017-08-07 22:47:19 +0200 |
---|---|---|
committer | Dean Moldovan <dean0x7d@gmail.com> | 2017-08-07 23:08:20 +0200 |
commit | 3dde6ddc5348d5ccd006b2ce00302ed076f59454 (patch) | |
tree | dca6120da1ae4f3d562f1b3b21d64c27ab198ae8 /CMakeLists.txt | |
parent | 017a747da650d81f3f92404ba6e4cb1e0edbaa05 (diff) | |
download | platform_external_python_pybind11-3dde6ddc5348d5ccd006b2ce00302ed076f59454.tar.gz platform_external_python_pybind11-3dde6ddc5348d5ccd006b2ce00302ed076f59454.tar.bz2 platform_external_python_pybind11-3dde6ddc5348d5ccd006b2ce00302ed076f59454.zip |
Add test for custom CMake export group
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index cf22a84..51a17d9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,9 +19,6 @@ set(PYBIND11_MASTER_PROJECT OFF) if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) set(PYBIND11_MASTER_PROJECT ON) endif() -if (NOT PYBIND11_EXPORT_NAME) - set(PYBIND11_EXPORT_NAME "${PROJECT_NAME}Targets") -endif () option(PYBIND11_INSTALL "Install pybind11 header files?" ${PYBIND11_MASTER_PROJECT}) option(PYBIND11_TEST "Build pybind11 test suite?" ${PYBIND11_MASTER_PROJECT}) @@ -133,6 +130,10 @@ if (PYBIND11_INSTALL) DESTINATION ${PYBIND11_CMAKECONFIG_INSTALL_DIR}) if(NOT (CMAKE_VERSION VERSION_LESS 3.0)) + if(NOT PYBIND11_EXPORT_NAME) + set(PYBIND11_EXPORT_NAME "${PROJECT_NAME}Targets") + endif() + install(TARGETS pybind11 module embed EXPORT "${PYBIND11_EXPORT_NAME}") if(PYBIND11_MASTER_PROJECT) |