From 853c3df01dfbecec50962da75c9900ac7f6f7f80 Mon Sep 17 00:00:00 2001 From: Mahder Gebremedhin Date: Sun, 22 Aug 2021 13:13:06 +0200 Subject: [PATCH] [cmake] Install SimulationRuntime/c headers. - We install all headers with in the directory and all its subdirectories recursively. - This might mean that some header files will be installed even though they are not needed. For now this is enough. We can manually specify which headers to install later. Even better we can put all our public headers in a separate include/ directory. --- OMCompiler/SimulationRuntime/c/cmake_3.14.cmake | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/OMCompiler/SimulationRuntime/c/cmake_3.14.cmake b/OMCompiler/SimulationRuntime/c/cmake_3.14.cmake index c3281b7e956..dc983e706a9 100644 --- a/OMCompiler/SimulationRuntime/c/cmake_3.14.cmake +++ b/OMCompiler/SimulationRuntime/c/cmake_3.14.cmake @@ -125,6 +125,20 @@ target_link_libraries(OptimizationRuntime PUBLIC omc::3rd::ipopt) install(TARGETS OptimizationRuntime) +## Install the header files. This installs the whole directory structure of c/ folder +## which means all headers will be installed keeping the directory structure intact. +## It might install some unneeded headers but it suffices for now. +install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/omc + FILES_MATCHING + PATTERN "*.h" + PATTERN "*.c.inc" + PATTERN "build" EXCLUDE # To skip the build dir created by the normal Makefiles build system. +) + + + + # ###################################################################################################################### # Quick and INCOMPLETE generation of RuntimeSources.mo set(DGESV_FILES \"\")