Skip to content

Commit

Permalink
[cmake] Install SimulationRuntime/c headers.
Browse files Browse the repository at this point in the history
  - 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.
  • Loading branch information
mahge committed Aug 23, 2021
1 parent 67c5bae commit 853c3df
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions OMCompiler/SimulationRuntime/c/cmake_3.14.cmake
Expand Up @@ -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 \"\")
Expand Down

0 comments on commit 853c3df

Please sign in to comment.