add cmake variable that controls if headers should be installed or not

This commit is contained in:
Max Lyon
2021-02-14 18:41:06 +01:00
parent 25c9b4d198
commit b32d5ef803
2 changed files with 14 additions and 2 deletions

View File

@@ -101,7 +101,13 @@ endif()
# Only install if the project name matches OpenMesh.
if (NOT APPLE AND ${CMAKE_PROJECT_NAME} MATCHES "OpenMesh")
if (${CMAKE_PROJECT_NAME} MATCHES "OpenMesh")
set (OPENMESH_NO_INSTALL_HEADERS FALSE CACHE BOOL "Should OpenMesh skip installing headers?")
else()
set (OPENMESH_NO_INSTALL_HEADERS TRUE CACHE BOOL "Should OpenMesh skip installing headers?")
endif()
if (NOT APPLE AND NOT ${OPENMESH_NO_INSTALL_HEADERS})
# Install Header Files)
install(DIRECTORY .