diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/CMakeLists.txt.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/CMakeLists.txt.mustache index b888c3743819..a7446c1845f0 100644 --- a/modules/openapi-generator/src/main/resources/C-libcurl/CMakeLists.txt.mustache +++ b/modules/openapi-generator/src/main/resources/C-libcurl/CMakeLists.txt.mustache @@ -92,8 +92,10 @@ target_link_libraries(${pkgName} ${CURL_LIBRARIES} ) include(PostTarget.cmake OPTIONAL) -if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in) - # installation of libraries, headers, and config files +# installation of libraries, headers, and config files +if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in) + install(TARGETS ${pkgName} DESTINATION ${CMAKE_INSTALL_PREFIX}) +else() include(GNUInstallDirs) install(TARGETS ${pkgName} EXPORT ${pkgName}Targets