<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi,</p>
<p>Migrating a code to msys2 compilation (cmake inside msys ), it
does not find an include file for unknwon reason.</p>
<p><br>
</p>
<p>the file is located in a project defined as follow:</p>
<p>cmake_minimum_required(VERSION 3.10)<br>
project(include_commun)<br>
<br>
add_library(include_commun INTERFACE)<br>
target_include_directories(include_commun INTERFACE .)</p>
<p><br>
</p>
<p>and the project causing error :</p>
<p>cmake_minimum_required(VERSION 3.10)<br>
project(import_export_unix)<br>
<br>
add_library(import_export_unix STATIC import_export_unix.h
import_export_unix.cpp)<br>
set_target_properties(import_export_unix PROPERTIES
POSITION_INDEPENDENT_CODE TRUE)<br>
target_include_directories(import_export_unix PUBLIC .)<br>
target_link_libraries(import_export_unix PRIVATE include_machine
include_commun)</p>
<p><br>
</p>
<p>error displayed :<br>
</p>
<p>[ 3%] Building CXX object
IMPORT_EXPORT_UNIX/CMakeFiles/import_export_unix.dir/import_export_unix.cpp.obj<br>
cd /e/WORKSPACE/BASE_SILFAX_SAFETY/build/IMPORT_EXPORT_UNIX
&& /mingw64/bin/c++.exe
@CMakeFiles/import_export_unix.dir/includes_CXX.rsp -o
CMakeFiles/import_export_unix.dir/import_export_unix.cpp.obj -c
/e/WORKSPACE/BASE_SILFAX_SAFETY/IMPORT_EXPORT_UNIX/import_export_unix.cpp<br>
E:/WORKSPACE/BASE_SILFAX_SAFETY/IMPORT_EXPORT_UNIX/import_export_unix.cpp:19:10:
fatal error: defprog.h: No such file or directory</p>
<p>CMakeFiles/import_export_unix.dir/includes_CXX.rsp content :</p>
<p>-I/e/WORKSPACE/BASE_SILFAX_SAFETY/IMPORT_EXPORT_UNIX/.
-I/e/WORKSPACE/BASE_SILFAX_SAFETY/INCLUDE_MACHINE/.
-I/e/WORKSPACE/BASE_SILFAX_SAFETY/INCLUDE_COMMUN/.</p>
<p><br>
</p>
<p>Regards,</p>
<p>Steph<br>
</p>
<p><br>
</p>
</body>
</html>