diff --git a/.circleci/continue_config.yml b/.circleci/continue_config.yml index 6106d578..02bb0665 100644 --- a/.circleci/continue_config.yml +++ b/.circleci/continue_config.yml @@ -85,6 +85,16 @@ jobs: -DGPT4ALL_GEN_CPACK_CONFIG=ON ~/Qt/Tools/CMake/CMake.app/Contents/bin/cmake --build . --target package ~/Qt/Tools/CMake/CMake.app/Contents/bin/cmake . -DGPT4ALL_GEN_CPACK_CONFIG=OFF + # The 'install' step here *should* be completely unnecessary. There is absolutely no reason we should have + # to copy all of the build artifacts to an output directory that we do not use (because we package GPT4All + # as an installer instead). + # However, because of the way signing is implemented in the cmake script, the *source* files are signed at + # install time instead of the *installed* files. This side effect is the *only* way libraries that are not + # processed by macdeployqt, such as libllmodel.so, get signed (at least, with -DBUILD_UNIVERSAL=ON). + # Also, we have to run this as a *separate* step. Telling cmake to run both targets in one command causes it + # to execute them in parallel, since it is not aware of the dependency of the package target on the install + # target. + ~/Qt/Tools/CMake/CMake.app/Contents/bin/cmake --build . --target install ~/Qt/Tools/CMake/CMake.app/Contents/bin/cmake --build . --target package ccache -s mkdir upload @@ -224,6 +234,8 @@ jobs: -DGPT4ALL_GEN_CPACK_CONFIG=ON ~/Qt/Tools/CMake/CMake.app/Contents/bin/cmake --build . --target package ~/Qt/Tools/CMake/CMake.app/Contents/bin/cmake . -DGPT4ALL_GEN_CPACK_CONFIG=OFF + # See comment above related to the 'install' target. + ~/Qt/Tools/CMake/CMake.app/Contents/bin/cmake --build . --target install ~/Qt/Tools/CMake/CMake.app/Contents/bin/cmake --build . --target package ccache -s mkdir upload diff --git a/gpt4all-chat/CMakeLists.txt b/gpt4all-chat/CMakeLists.txt index 0d4a6e15..395c50bc 100644 --- a/gpt4all-chat/CMakeLists.txt +++ b/gpt4all-chat/CMakeLists.txt @@ -10,6 +10,10 @@ set(APP_VERSION "${APP_VERSION_BASE}") project(gpt4all VERSION ${APP_VERSION_BASE} LANGUAGES CXX C) +if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "..." FORCE) +endif() + if(APPLE) option(BUILD_UNIVERSAL "Build a Universal binary on macOS" OFF) if(BUILD_UNIVERSAL) @@ -126,10 +130,6 @@ message(STATUS "Qt 6 root directory: ${Qt6_ROOT_DIR}") set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) -if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "..." FORCE) -endif() - add_subdirectory(deps) add_subdirectory(../gpt4all-backend llmodel)