Skip to content

Commit

Permalink
refs modelica#4093 Have normalized include directories
Browse files Browse the repository at this point in the history
  • Loading branch information
beutlich committed Jan 26, 2024
1 parent 12494fd commit 2632f21
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
if(DEFINED MODELICA_UTILITIES_INCLUDE_DIR)
if(NOT MODELICA_UTILITIES_INCLUDE_DIR STREQUAL "")
file(TO_CMAKE_PATH ${MODELICA_UTILITIES_INCLUDE_DIR} MODELICA_UTILITIES_INCLUDE_DIR)
include_directories(${MODELICA_UTILITIES_INCLUDE_DIR})
else()
message(FATAL_ERROR "MODELICA_UTILITIES_INCLUDE_DIR is an empty string.")
endif()
else()
set(MODELICA_UTILITIES_INCLUDE_DIR "" CACHE PATH "Include directory of the (tool-vendor specific) ModelicaUtilities.h header file")
if(NOT MODELICA_UTILITIES_INCLUDE_DIR STREQUAL "")
file(TO_CMAKE_PATH ${MODELICA_UTILITIES_INCLUDE_DIR} MODELICA_UTILITIES_INCLUDE_DIR)
include_directories(${MODELICA_UTILITIES_INCLUDE_DIR})
else()
message(FATAL_ERROR "MODELICA_UTILITIES_INCLUDE_DIR is an empty string.")
Expand Down
3 changes: 3 additions & 0 deletions Modelica/Resources/BuildProjects/CMake/src.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,19 @@ endif()

if(MODELICA_BUILD_ZLIB)
set(ZLIB_INCLUDE_DIR "${MODELICA_RESOURCES_DIR}/C-Sources/zlib")
file(TO_CMAKE_PATH ${ZLIB_INCLUDE_DIR} ZLIB_INCLUDE_DIR)
include_directories(${ZLIB_INCLUDE_DIR})
elseif(DEFINED ZLIB_INCLUDE_DIR)
if(NOT ZLIB_INCLUDE_DIR STREQUAL "")
file(TO_CMAKE_PATH ${ZLIB_INCLUDE_DIR} ZLIB_INCLUDE_DIR)
include_directories(${ZLIB_INCLUDE_DIR})
else()
message(FATAL_ERROR "ZLIB_INCLUDE_DIR is an empty string.")
endif()
else()
set(ZLIB_INCLUDE_DIR "" CACHE PATH "Include directory of the zlib.h header file")
if(NOT ZLIB_INCLUDE_DIR STREQUAL "")
file(TO_CMAKE_PATH ${ZLIB_INCLUDE_DIR} ZLIB_INCLUDE_DIR)
include_directories(${ZLIB_INCLUDE_DIR})
else()
message(FATAL_ERROR "ZLIB_INCLUDE_DIR is an empty string.")
Expand Down

0 comments on commit 2632f21

Please sign in to comment.