add_subdirectory(Interface) add_subdirectory(ExecBackends) add_subdirectory(Optimization) add_subdirectory(LinAlg) add_subdirectory(Utils) # Interface headers not already picked up by another subdirectory set(hiop_INTERFACE_HEADERS ${PROJECT_BINARY_DIR}/hiop_defs.hpp ${PROJECT_BINARY_DIR}/FortranCInterface.hpp ) install( FILES ${hiop_INTERFACE_HEADERS} DESTINATION include ) # Create shared and static libraries from sources defined in subdirectories foreach(libtype shared static) string(TOUPPER ${libtype} libtype_upper) if(${HIOP_BUILD_${libtype_upper}}) add_library(hiop_${libtype} ${libtype_upper} $ $ $ $ $<$:$> ) target_link_libraries(hiop_${libtype} PUBLIC hiop_tpl) target_include_directories(hiop_${libtype} PUBLIC $ $) set_target_properties(hiop_${libtype} PROPERTIES OUTPUT_NAME hiop) install(TARGETS hiop_${libtype} DESTINATION lib EXPORT hiop-targets) endif() endforeach() # Create default library pointed to by HiOp::HiOp add_library(HiOp::HiOp ALIAS ${hiop_default_library_name})