Add installation of runtime include headers for LibTCC.
@@ -77,6 +77,7 @@ set(LIBTCC_TARGET libtcc-depends)
set(LIBTCC_COMMIT_SHA "da11cf651576f94486dbd043dbfcde469e497574")
set(LIBTTC_LIBRARY_NAME "${CMAKE_SHARED_LIBRARY_PREFIX}tcc${CMAKE_SHARED_LIBRARY_SUFFIX}")
set(LIBTTC_LIBRARY_PATH "${PROJECT_OUTPUT_DIR}/${LIBTTC_LIBRARY_NAME}")
+set(LIBTTC_RUNTIME_INCLUDE_PATH "${LIBTCC_INSTALL_PREFIX}/lib/tcc/include")
# LibTCC Proejct
ExternalProject_Add(${LIBTCC_TARGET}
@@ -99,6 +100,15 @@ ${LIBTTC_LIBRARY_PATH}
COMPONENT runtime
)
+# Header files
+file(GLOB LIBTCC_RUNTIME_INCLUDE_FILES "${LIBTTC_RUNTIME_INCLUDE_PATH}/*.h")
+
+install(FILES
+ ${LIBTCC_RUNTIME_INCLUDE_FILES}
+ DESTINATION ${INSTALL_INCLUDE}
+ COMPONENT dev
+)
+
set(LIBTCC_INCLUDE_DIR "${LIBTCC_INSTALL_PREFIX}/include")
set(LIBTCC_LIBRARY "${LIBTTC_LIBRARY_PATH}")
set(LIBTCC_FOUND TRUE)
