mirror of
https://github.com/nomic-ai/gpt4all
synced 2024-11-02 09:40:42 +00:00
macOS specific cmake changes experiment.
This commit is contained in:
parent
93f54742b9
commit
134b4dd286
@ -98,6 +98,7 @@ qt_add_qml_module(chat
|
||||
)
|
||||
|
||||
set_target_properties(chat PROPERTIES
|
||||
OUTPUT_NAME GPT4All
|
||||
MACOSX_BUNDLE_GUI_IDENTIFIER gpt4all.chat
|
||||
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
|
||||
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
|
||||
@ -121,7 +122,15 @@ if(NOT (CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_HOST_SYSTEM_PROCESSOR
|
||||
endif()
|
||||
|
||||
install(TARGETS chat DESTINATION bin COMPONENT ${COMPONENT_NAME_MAIN})
|
||||
install(TARGETS llama DESTINATION lib COMPONENT ${COMPONENT_NAME_MAIN})
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
set_target_properties(llama PROPERTIES
|
||||
BUILD_WITH_INSTALL_RPATH TRUE
|
||||
INSTALL_RPATH "@loader_path/../Frameworks"
|
||||
)
|
||||
install(TARGETS llama DESTINATION Frameworks COMPONENT ${COMPONENT_NAME_MAIN})
|
||||
else()
|
||||
install(TARGETS llama DESTINATION lib COMPONENT ${COMPONENT_NAME_MAIN})
|
||||
endif()
|
||||
|
||||
set(CPACK_GENERATOR "IFW")
|
||||
set(CPACK_VERBATIM_VARIABLES YES)
|
||||
@ -152,7 +161,7 @@ elseif(${CMAKE_SYSTEM_NAME} MATCHES Darwin)
|
||||
set(CPACK_IFW_ROOT "~/Qt/Tools/QtInstallerFramework/4.5")
|
||||
set(CPACK_IFW_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/icons/favicon.icns")
|
||||
set(CPACK_PACKAGE_FILE_NAME "${COMPONENT_NAME_MAIN}-installer-darwin")
|
||||
set(CPACK_IFW_TARGET_DIRECTORY "@HomeDir@/Applications/${COMPONENT_NAME_MAIN}")
|
||||
set(CPACK_IFW_TARGET_DIRECTORY "@HomeDir@/Applications/")
|
||||
set(CPACK_BUNDLE_NAME ${COMPONENT_NAME_MAIN})
|
||||
set(CPACK_BUNDLE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/icons/favicon.icns")
|
||||
endif()
|
||||
|
@ -1,7 +1,7 @@
|
||||
set(MACDEPLOYQT "@MACDEPLOYQT@")
|
||||
set(COMPONENT_NAME_MAIN "@COMPONENT_NAME_MAIN@")
|
||||
set(CMAKE_CURRENT_SOURCE_DIR "@CMAKE_CURRENT_SOURCE_DIR@")
|
||||
execute_process(COMMAND ${MACDEPLOYQT} ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/packages/${COMPONENT_NAME_MAIN}/data/bin/chat.app -qmldir=${CMAKE_CURRENT_SOURCE_DIR} -verbose=2)
|
||||
execute_process(COMMAND ${MACDEPLOYQT} ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/packages/${COMPONENT_NAME_MAIN}/data/bin/chat.app -executable="${CMAKE_INSTALL_PREFIX}/bin/chat.app/Contents/Frameworks/llama.dylib" -qmldir=${CMAKE_CURRENT_SOURCE_DIR} -verbose=2)
|
||||
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/icons/logo-16.png"
|
||||
DESTINATION ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/packages/${COMPONENT_NAME_MAIN}/data)
|
||||
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/icons/logo-32.png"
|
||||
|
Loading…
Reference in New Issue
Block a user