D17053: Fix link on MacOS

René J.V. Bertin noreply at phabricator.kde.org
Wed Nov 21 00:15:47 GMT 2018


rjvbb requested changes to this revision.
rjvbb added a comment.
This revision now requires changes to proceed.


  > @rjvbb what do you say? makes sense?
  
  Yes, this is required. I've got a bunch of patches for Okular I never got around to sub/committing. 
  The patch as proposed is OK as a packaging patch, but requires some polishing before it's fit for upstreaming. You can take inspiration from my version of this patch:
  
    --- a/CMakeLists.txt
    +++ b/CMakeLists.txt
    @@ -216,7 +216,7 @@ generate_export_header(okularcore BASE_NAME okularcore EXPORT_FILE_NAME "${CMAKE
     
     # Special handling for linking okularcore on OSX/Apple
     IF(APPLE)
    -    SET(OKULAR_IOKIT "-framework IOKit" CACHE STRING "Apple IOKit framework")
    +    SET(OKULAR_APPLE_FRAMEWORKS "-framework IOKit -framework CoreGraphics -framework CoreFoundation" CACHE STRING "required Apple frameworks")
     ENDIF(APPLE)
     
     # Extra library needed by imported synctex code on Windows
    @@ -226,7 +226,7 @@ endif(WIN32)
     
     target_link_libraries(okularcore
     PRIVATE
    -    ${OKULAR_IOKIT}
    +    ${OKULAR_APPLE_FRAMEWORKS}
         ${SHLWAPI}
         KF5::Archive
         KF5::JS

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D17053

To: darcyshen, #okular, rjvbb
Cc: aacid, rjvbb, okular-devel, ngraham, darcyshen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20181121/badec70e/attachment.html>


More information about the Okular-devel mailing list