CMake fails on first configure

Yu Jin technikmagma at gmail.com
Sat Oct 21 11:47:13 UTC 2023


Am Sa., 21. Okt. 2023 um 08:42 Uhr schrieb Yu Jin <technikmagma at gmail.com>:

> Am So., 15. Okt. 2023 um 22:32 Uhr schrieb Yu Jin <technikmagma at gmail.com
> >:
>
>> Am Mo., 2. Okt. 2023 um 21:51 Uhr schrieb Yu Jin:
>>
>>>
>>> C:\Qt\6.5.2\msvc2019_64\include\QtGui\qtgui-config.h
>>>
>>
>> Ping...
>> I don't really understand what is wrong here, could some1 help out with a
>> minimal example so I can ask the Qt forum?
>>
>> Git bisect leads to this
>
> https://git.lyx.org/?p=lyx.git;a=commitdiff;h=ebe4834684a523de15f55068a32b487cae251bea
>
> I ran cmake with --debug-trycompile and found some more infos, here is
the error:

-- Looking for C++ include QtGui/qtgui-config.h
CMake Debug Log at C:/Program
Files/CMake/share/cmake-3.26/Modules/CheckIncludeFileCXX.cmake:94
(try_compile):
  Executing try_compile (HAVE_QTGUI_CONFIG_H) in:

    C:/lyx/master-build-64/CMakeFiles/CMakeScratch/TryCompile-896vpl
Call Stack (most recent call first):
  development/cmake/ConfigureChecks.cmake:290 (check_include_file_cxx)
  CMakeLists.txt:1146 (include)


CMake Error at
C:/lyx/master-build-64/CMakeFiles/CMakeScratch/TryCompile-896vpl/CMakeLists.txt:12
(include_directories):
  Error evaluating generator expression:

    $<TARGET_PROPERTY:Qt6::ZlibPrivate,_qt_module_has_private_headers>

  Target "Qt6::ZlibPrivate" not found.

here is the File
C:/lyx/master-build-64/CMakeFiles/CMakeScratch/TryCompile-896vpl/CMakeLists.txt:

cmake_minimum_required(VERSION 3.28.0.0)
set(CMAKE_MODULE_PATH
"C:/lyx/master/development/cmake/modules;C:/Qt/6.6.0/msvc2019_64/lib/cmake/Qt6;C:/Qt/6.6.0/msvc2019_64/lib/cmake/Qt6/3rdparty/extra-cmake-modules/find-modules;C:/Qt/6.6.0/msvc2019_64/lib/cmake/Qt6/3rdparty/kwin")
cmake_policy(SET CMP0091 OLD)
cmake_policy(SET CMP0141 OLD)
cmake_policy(SET CMP0126 OLD)
cmake_policy(SET CMP0128 OLD)
project(CMAKE_TRY_COMPILE CXX)
set(CMAKE_VERBOSE_MAKEFILE 1)
set(CMAKE_CXX_FLAGS "/DWIN32 /D_WINDOWS /W3 /GR /EHsc")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILE_DEFINITIONS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${EXE_LINKER_FLAGS}")
include_directories(${INCLUDE_DIRECTORIES})
set(CMAKE_SUPPRESS_REGENERATION 1)
link_directories(${LINK_DIRECTORIES})
cmake_policy(SET CMP0065 OLD)
cmake_policy(SET CMP0083 OLD)
cmake_policy(SET CMP0155 OLD)
include("${CMAKE_ROOT}/Modules/Internal/HeaderpadWorkaround.cmake")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY
"C:/lyx/master-build-64/CMakeFiles/CMakeScratch/ TryCompile-896vpl")
add_executable(cmTC_cde46)
target_sources(cmTC_cde46 PRIVATE

"C:/lyx/master-build-64/CMakeFiles/CMakeScratch/TryCompile-896vpl/CheckIncludeFile.cxx"
)
file(GENERATE OUTPUT
"${CMAKE_BINARY_DIR}/cmTC_cde46_$<UPPER_CASE:$<CONFIG>>_loc"
     CONTENT $<TARGET_FILE:cmTC_cde46>)
target_link_libraries(cmTC_cde46 ${LINK_LIBRARIES})


So it fails on
include_directories(${INCLUDE_DIRECTORIES})
I have checked the file
C:/lyx/master-build-64/CMakeFiles/CMakeScratch/TryCompile-896vpl/CMakeCache.txt:

//No help, variable specified on the command line.
INCLUDE_DIRECTORIES:UNINITIALIZED=C:/Qt/6.6.0/msvc2019_64/include/QtCore;C:/Qt/6.6.0/msvc2019_64/include;C:/Qt/6.6.0/msvc2019_64/include/QtZlib;$<$<BOOL:$<TARGET_PROPERTY:Qt6::ZlibPrivate,_qt_module_has_private_headers>>:>;$<$<BOOL:$<TARGET_PROPERTY:Qt6::ZlibPrivate,_qt_module_has_private_headers>>:C:/Qt/6.6.0/msvc2019_64/include/QtZlib/6.6.0>;$<$<BOOL:$<TARGET_PROPERTY:Qt6::ZlibPrivate,_qt_module_has_private_headers>>:C:/Qt/6.6.0/msvc2019_64/include/QtZlib/6.6.0/QtZlib>

Is this something variable specified by CMake or can we affect it? Maybe
it's the same thing as in this thread?
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg218586.html
For quick reminder we ended up doing this:
https://git.lyx.org/?p=lyx.git;a=commitdiff;h=26a3a085
-- 
  Eugene
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20231021/e8b54293/attachment.html>


More information about the lyx-devel mailing list