metainfo wrong target dir?
Yu Jin
technikmagma at gmail.com
Thu May 16 19:08:55 UTC 2024
Am Do., 16. Mai 2024 um 11:30 Uhr schrieb Kornel Benko:
> Am Wed, 15 May 2024 17:00:28 +0200
> schrieb Yu Jin:
>
> > Am Di., 14. Mai 2024 um 20:21 Uhr schrieb Pavel Sanda:
> >
> > > On Tue, May 14, 2024 at 06:16:49PM +0200, Yu Jin wrote:
> > > > Why does it try to install that file into my Program Files dir and
> not
> > > into
> > > > CMAKE_INSTALL_PREFIX?
> > >
> > > I do not know, but this file is part of linux infrastructure and can be
> > > dropped
> > > completely from windows.
> >
> >
> > Strange thing is that the cmake_install.cmake file contains the code part
> > sent by me earlier only on the first CMake configure run into an empty
> > directory. When I reconfigure the code part is not present anymore and I
> > don't get the error message. So how to fix it?
>
> Looks like CMAKE_INSTALL_PREFIX is used (from cmake default) before set by
> CMakeLists.txt.
> On second run the correct value is used from cache.
>
On the second run this whole part in cmake_install.cmake
if(CMAKE_INSTALL_COMPONENT STREQUAL "Unspecified" OR NOT
CMAKE_INSTALL_COMPONENT)
list(APPEND CMAKE_ABSOLUTE_DESTINATION_FILES
"C:/Program Files/LyX/metainfo/org.lyx.LyX.metainfo.xml")
if(CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION)
message(WARNING "ABSOLUTE path INSTALL DESTINATION :
${CMAKE_ABSOLUTE_DESTINATION_FILES}")
endif()
if(CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION)
message(FATAL_ERROR "ABSOLUTE path INSTALL DESTINATION forbidden (by
caller): ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
endif()
file(INSTALL DESTINATION "C:/Program Files/LyX/metainfo" TYPE FILE FILES
"C:/lyx/master/lib/org.lyx.LyX.metainfo.xml")
endif()
becomes this
if(CMAKE_INSTALL_COMPONENT STREQUAL "Unspecified" OR NOT
CMAKE_INSTALL_COMPONENT)
file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/LYX_INSTALLED/metainfo"
TYPE FILE FILES "C:/lyx/master/lib/org.lyx.LyX.metainfo.xml")
endif()
> I don't see it in linux though.
>
> You could check the value at CMakeLists.txt:575 (after being set on line
> 573).
> message(STATUS "CMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}")
>
This is the output
CMAKE_INSTALL_PREFIX=LYX_INSTALLED
looks fine I guess.
--
Eugene
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20240516/15dddbb3/attachment-0001.html>
More information about the lyx-devel
mailing list