Am Montag, 29. Dezember 2014 um 13:18:46, schrieb Kornel Benko <kor...@lyx.org> > > I don't know. But note, it's the target LyX failing to link, not only > > check_ExternalTransforms. > > > > Stephan > > In this case I cannot much help >
Just to be sure, you can compile with autotools? I tried to mimic the autotools use of frameworks. Could you try the patch? Kornel
diff --git a/development/cmake/modules/LyXMacros.cmake b/development/cmake/modules/LyXMacros.cmake index 2d20cb7..9f9771c 100644 --- a/development/cmake/modules/LyXMacros.cmake +++ b/development/cmake/modules/LyXMacros.cmake @@ -340,3 +340,11 @@ macro(lyx_target_link_libraries _target) endforeach() endmacro() +macro(lyx_apple_target_link_libraries _target) + if(APPLE) + foreach(_lib ${ARGN}) + target_link_libraries(${_target} "-framework ${_lib}") + endforeach() + endif() +endmacro() + diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c15f098..05af104 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -136,14 +136,15 @@ qt_use_modules(${_lyx} Core Gui) lyx_target_link_libraries(${_lyx} HUNSPELL ASPELL ENCHANT Magic) -if(APPLE) - target_link_libraries(${_lyx} "-bind_at_load") - if(LYX_COCOA) - target_link_libraries(${_lyx} "-framework Cocoa") - else() - target_link_libraries(${_lyx} "-framework AppKit") - endif() -endif() +#if(APPLE) +# target_link_libraries(${_lyx} "-bind_at_load") +# if(LYX_COCOA) +# target_link_libraries(${_lyx} "-framework Cocoa") +# else() +# target_link_libraries(${_lyx} "-framework AppKit") +# endif() +#endif() +lyx_apple_target_link_libraries(${_lyx} AppKit ApplicationServices) if(MINGW) target_link_libraries(${_lyx} ole32) diff --git a/src/client/CMakeLists.txt b/src/client/CMakeLists.txt index f1e51a2..7835736 100644 --- a/src/client/CMakeLists.txt +++ b/src/client/CMakeLists.txt @@ -34,9 +34,11 @@ target_link_libraries(${_lyxclient} lyx_target_link_libraries(${_lyxclient} Magic ASPELL) -if(APPLE) - target_link_libraries(${_lyxclient} "-framework AppKit") -endif() +#if(APPLE) +# target_link_libraries(${_lyxclient} "-framework AppKit") +#endif() + +lyx_apple_target_link_libraries(${_lyxclient} AppKit) if(CYGWIN) target_link_libraries(${_lyxclient} shlwapi) diff --git a/src/support/CMakeLists.txt b/src/support/CMakeLists.txt index 42a9134..0106a6f 100644 --- a/src/support/CMakeLists.txt +++ b/src/support/CMakeLists.txt @@ -92,7 +92,8 @@ target_link_libraries(support ${Lyx_Boost_Libraries} ${QT_QTCORE_LIBRARY} ${ZLIB lyx_add_gcc_pch(support) if(APPLE) - target_link_libraries(support "objc" "-framework AppKit" "-framework CoreFoundation") + target_link_libraries(support "objc") + #target_link_libraries(support "objc" "-framework AppKit" "-framework CoreFoundation") if(CMAKE_COMPILER_IS_GNUCXX) set_source_files_properties(${support_sources} PROPERTIES COMPILE_FLAGS "-fobjc-exceptions") endif() @@ -100,5 +101,7 @@ elseif(WIN32) target_link_libraries(support shlwapi psapi) endif() +lyx_apple_target_link_libraries(support QtGui QtCore AppKit ApplicationServices) + project_source_group("${GROUP_CODE}" support_sources support_headers) diff --git a/src/tex2lyx/CMakeLists.txt b/src/tex2lyx/CMakeLists.txt index 09bcc2b..0f999dd 100644 --- a/src/tex2lyx/CMakeLists.txt +++ b/src/tex2lyx/CMakeLists.txt @@ -62,10 +62,11 @@ if(CYGWIN) target_link_libraries(${_tex2lyx} shlwapi ole32) endif() -if(APPLE) - target_link_libraries(${_tex2lyx} "-framework AppKit") -endif() +#if(APPLE) +# target_link_libraries(${_tex2lyx} "-framework AppKit") +#endif() +lyx_apple_target_link_libraries(${_tex2lyx} AppKit) project_source_group("${GROUP_CODE}" tex2lyx_sources tex2lyx_headers)
signature.asc
Description: This is a digitally signed message part.