# macos specific cpack stuff goes here
return ( )
# Here we build lokinet-network-control-panel into 'lokinet-gui.app' in "extra/" where a postinstall
# script will then move it to /Applications/.
set ( LOKINET_GUI_REPO "https://github.com/oxen-io/loki-network-control-panel.git"
C A C H E S T R I N G " C a n b e s e t t o o v e r r i d e t h e d e f a u l t l o k i n e t - g u i g i t r e p o s i t o r y " )
set ( LOKINET_GUI_CHECKOUT "origin/master"
C A C H E S T R I N G " C a n b e s e t t o s p e c i f y a p a r t i c u l a r b r a n c h o r t a g t o b u i l d f r o m L O K I N E T _ G U I _ R E P O " )
set ( MACOS_SIGN_APP "" # FIXME: it doesn't use a Apple Distribution key because WTF knows.
C A C H E S T R I N G " e n a b l e c o d e s i g n i n g o f t h e s t u f f i n s i d e t h e . a p p a n d t h e l o k i n e t b i n a r y - - u s e a ' A p p l e D i s t r i b u t i o n ' key ( or description ) f r o m ` s e c u r i t y f i n d - i d e n t i t y - v ` " )
set ( MACOS_SIGN_PKG ""
C A C H E S T R I N G " e n a b l e c o d e s i g n i n g o f t h e . p k g - - u s e a ' D e v e l o p e r I D I n s t a l l e r ' key ( or description ) f r o m ` s e c u r i t y f i n d - i d e n t i t y - v ` " )
set ( MACOS_NOTARIZE_USER ""
C A C H E S T R I N G " s e t m a c o s n o t a r i z a t i o n u s e r n a m e ; c a n a l s o s e t i t i n ~ / . n o t a r i z a t i o n . c m a k e " )
set ( MACOS_NOTARIZE_PASS ""
C A C H E S T R I N G " s e t m a c o s n o t a r i z a t i o n p a s s w o r d ; c a n a l s o s e t i t i n ~ / . n o t a r i z a t i o n . c m a k e " )
set ( MACOS_NOTARIZE_ASC ""
C A C H E S T R I N G " s e t m a c o s n o t a r i z a t i o n a s c p r o v i d e r ; c a n a l s o s e t i t i n ~ / . n o t a r i z a t i o n . c m a k e " )
if ( NOT BUILD_STATIC_DEPS )
message ( FATAL_ERROR "Building an installer on macos requires -DBUILD_STATIC_DEPS=ON" )
endif ( )
#set(CPACK_GENERATOR "Bundle")
#set(MACOSX_BUNDLE_BUNDLE_NAME Lokinet)
#set(CPACK_BUNDLE_NAME Lokinet)
#set(CPACK_BUNDLE_PLIST ${CMAKE_SOURCE_DIR}/contrib/macos/Info.plist)
#set(CPACK_BUNDLE_ICON "${CMAKE_CURRENT_BINARY_DIR}/lokinet.icns")
#set(CPACK_BUNDLE_STARTUP_COMMAND ${CMAKE_BINARY_DIR}/daemon/lokinet)
#set(MACOSX_BUNDLE_GUI_IDENTIFIER org.lokinet.lokinet)
#set(MACOSX_BUNDLE_INFO_STRING "Lokinet IP Packet Onion Router")
#set(MACOSX_BUNDLE_LONG_VERSION_STRING ${PROJECT_VERSION})
#set(MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION})
#set(MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION})
#set(MACOSX_BUNDLE_COPYRIGHT "© 2021, The Loki Project")
#set(CPACK_BUNDLE_APPLE_ENTITLEMENTS ${CMAKE_SOURCE_DIR}/contrib/macos/lokinet.entitlements)
#set(CPACK_BUNDLE_APPLE_CERT_APP "${MACOS_SIGN_APP}")
if ( MACOS_SIGN_APP AND MACOS_SIGN_PKG )
if ( NOT MACOS_NOTARIZE_USER )
if ( EXISTS "$ENV{HOME}/.notarization.cmake" )
include ( "$ENV{HOME}/.notarization.cmake" )
endif ( )
endif ( )
if ( MACOS_NOTARIZE_USER AND MACOS_NOTARIZE_PASS AND MACOS_NOTARIZE_ASC )
message ( STATUS "'notarization' target enabled" )
configure_file ( ${ CMAKE_SOURCE_DIR } /contrib/macos/notarize.py.in ${ CMAKE_CURRENT_BINARY_DIR } /contrib/notarize.py ESCAPE_QUOTES @ONLY )
file ( COPY ${ CMAKE_CURRENT_BINARY_DIR } /contrib/notarize.py DESTINATION ${ PROJECT_BINARY_DIR } FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE )
add_custom_target ( notarize ./notarize.py )
else ( )
message ( WARNING "Not enable 'notarization' target: signing is enabled but notarization info not provided. Create ~/.notarization.cmake or set cmake parameters directly" )
endif ( )
endif ( )