diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index cc5952c..bdf0414 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -108,7 +108,6 @@ target_include_directories(fmi4cpp $ PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}" - "${CMAKE_CURRENT_SOURCE_DIR}/external/pugixml" ) if (FMI4CPP_USE_EXTERNAL_PUGIXML) @@ -116,6 +115,11 @@ if (FMI4CPP_USE_EXTERNAL_PUGIXML) PRIVATE pugixml::pugixml ) +else () + target_include_directories(fmi4cpp + PRIVATE + "${CMAKE_CURRENT_SOURCE_DIR}/external/pugixml" + ) endif () if(WIN32)