Using the latest commit and building lyx with cmake on macos-sonoma with xcode fails with multiple error messages like this one:

----------
CMake Error in po/CMakeLists.txt:
      The custom command generating

    <build-directory>/po/LyX2.4.cat.pot

      is attached to multiple targets:

    translations
    update-gmo

 but none of these is a common dependency of the other(s).  This is not
 allowed by the Xcode "new build system".
-----------

These issues are solved by adding the following target dependencies (patch included)

        add_dependencies(update-gmo translations)
        add_dependencies(update-gmo update-po)

        add_dependencies(cleanupdatetex2lyxtests updatetex2lyxtests)


pdv
diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt
index 065448e6e5..280b3535eb 100755
--- a/po/CMakeLists.txt
+++ b/po/CMakeLists.txt
@@ -271,4 +271,5 @@ ADD_CUSTOM_TARGET(update-gmo DEPENDS 
${LYX_UPDATED_GMO_FILES})
 ADD_CUSTOM_TARGET(update-po DEPENDS ${LYX_UPDATED_PO_FILES} 
${LYX_UPDATED_GMO_FILES})
 set_target_properties(update-po update-gmo PROPERTIES FOLDER "i18n")
 add_dependencies(update-po translations)
-
+add_dependencies(update-gmo translations)
+add_dependencies(update-gmo update-po)
\ No newline at end of file
diff --git a/src/tex2lyx/test/CMakeLists.txt b/src/tex2lyx/test/CMakeLists.txt
index e620e067c4..7be27f9a13 100644
--- a/src/tex2lyx/test/CMakeLists.txt
+++ b/src/tex2lyx/test/CMakeLists.txt
@@ -105,3 +105,4 @@ add_custom_command(
 
 add_custom_target(cleanupdatetex2lyxtests DEPENDS UpdateFilesRemoved)
 set_target_properties(cleanupdatetex2lyxtests PROPERTIES FOLDER 
"tests/tex2lyx")
+add_dependencies(cleanupdatetex2lyxtests updatetex2lyxtests)
\ No newline at end of file
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to