diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2020-11-04 18:12:30 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2020-11-05 18:50:34 +0100 |
commit | 6742081a5584b0f682cd29d2c593553c862d942f (patch) | |
tree | dc65511b9bc1f948dd717068431a272c56d9d1a0 | |
parent | afc8e54e718df80fd8bd4089b4ec382ce5978dc0 (diff) | |
download | ktechlab-6742081a5584b0f682cd29d2c593553c862d942f.tar.gz ktechlab-6742081a5584b0f682cd29d2c593553c862d942f.zip |
Add workaround for broken gpsim includes.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 82104ef5becc2a61ff64355ca5202a4a9bc20d31)
-rw-r--r-- | ConfigureChecks.cmake | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index c6003b0..c57f627 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -53,6 +53,21 @@ if( NOT WITH_GPSIM ) ##### check for gpsim version + if( EXISTS ${GPSIM_INCLUDE_DIRS}/gpsim/breakpoints.h ) + file( STRINGS ${GPSIM_INCLUDE_DIRS}/gpsim/breakpoints.h + GPSIM_BROKEN_INCLUDE + REGEX "^#include \"../config.h" ) + if( NOT "${GPSIM_BROKEN_INCLUDE}" STREQUAL "" ) + message( STATUS "Create fake config.h, due to broken gpsim includes" ) + list( APPEND CMAKE_REQUIRED_INCLUDES "${CMAKE_BINARY_DIR}/CMakeFiles" ) + list( APPEND GPSIM_INCLUDE_DIRS "${CMAKE_BINARY_DIR}/src" ) + if( NOT EXISTS "${CMAKE_BINARY_DIR}/config.h" ) + file( WRITE "${CMAKE_BINARY_DIR}/config.h" + "/* fake config.h - due to broken gpsim includes */" ) + endif() + endif() + endif() + check_cxx_source_compiles( " #include <gpsim/interface.h> #include <gpsim/gpsim_interface.h> |