Skip to content

Commit

Permalink
cmake: Do not prefix IMGUR_API_KEY
Browse files Browse the repository at this point in the history
This variable is supplied via Github Actions secret, so better to keep the name.
Sometimes it is set directly from Github Actions for platform that do not have a
build.sh (like Windows).
  • Loading branch information
syyyr authored and MartinBriza committed Jan 1, 2025
1 parent 73f5bf8 commit 53841b6
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dist/android/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ fi

export QT_HOST_PATH="${QT_ROOT_DIR}/../gcc_64"
export CMAKE_PREFIX_PATH=${QT_ROOT_DIR}/lib/cmake
cmake .. -DQT_DEBUG_FIND_PACKAGE=ON -DCMAKE_BUILD_TYPE=Release -DLITH_IMGUR_API_KEY=$IMGUR_API_KEY -DCMAKE_INSTALL_PREFIX=installed -DCMAKE_TOOLCHAIN_FILE=$QT_ROOT_DIR/lib/cmake/Qt6/qt.toolchain.cmake -DANDROID_OPENSSL_PATH="${ANDROID_OPENSSL_PATH}" -DQT_ANDROID_BUILD_ALL_ABIS=ON
cmake .. -DQT_DEBUG_FIND_PACKAGE=ON -DCMAKE_BUILD_TYPE=Release -DIMGUR_API_KEY=$IMGUR_API_KEY -DCMAKE_INSTALL_PREFIX=installed -DCMAKE_TOOLCHAIN_FILE=$QT_ROOT_DIR/lib/cmake/Qt6/qt.toolchain.cmake -DANDROID_OPENSSL_PATH="${ANDROID_OPENSSL_PATH}" -DQT_ANDROID_BUILD_ALL_ABIS=ON

cmake --build . --target Lith -- -j2
cmake --build . --target apk -- -j2
Expand Down
2 changes: 1 addition & 1 deletion dist/ios/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ mkdir build_ios
cd build_ios

export QT_HOST_PATH="${QT_ROOT_DIR}/../macos"
cmake .. -GXcode -DCMAKE_PREFIX_PATH=$QT_ROOT_DIR -DCMAKE_OSX_SYSROOT=iphoneos -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_TOOLCHAIN_FILE=$QT_ROOT_DIR/lib/cmake/Qt6/qt.toolchain.cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLITH_VERSION=$VERSION_NAME -DIOS_DEVELOPMENT_TEAM_ID=Z52EFCPL6D -DLITH_IMGUR_API_KEY=$IMGUR_API_KEY
cmake .. -GXcode -DCMAKE_PREFIX_PATH=$QT_ROOT_DIR -DCMAKE_OSX_SYSROOT=iphoneos -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_TOOLCHAIN_FILE=$QT_ROOT_DIR/lib/cmake/Qt6/qt.toolchain.cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLITH_VERSION=$VERSION_NAME -DIOS_DEVELOPMENT_TEAM_ID=Z52EFCPL6D -DIMGUR_API_KEY=$IMGUR_API_KEY

xcodebuild -project Lith.xcodeproj -destination generic/platform=iOS -scheme Lith -configuration RelWithDebInfo DEVELOPMENT_TEAM=Z52EFCPL6D build
xcodebuild -project Lith.xcodeproj -scheme Lith -configuration RelWithDebInfo archive -archivePath Lith.xcarchive DEVELOPMENT_TEAM=Z52EFCPL6D
Expand Down
2 changes: 1 addition & 1 deletion dist/macos/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
mkdir build_macos
cd build_macos
export CMAKE_PREFIX_PATH=$QT_ROOT_DIR/lib/cmake
cmake .. -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -DCMAKE_BUILD_TYPE=Release -DLITH_IMGUR_API_KEY=$IMGUR_API_KEY -DLITH_VERSION=$VERSION_NAME -DCMAKE_INSTALL_PREFIX=installed
cmake .. -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -DCMAKE_BUILD_TYPE=Release -DIMGUR_API_KEY=$IMGUR_API_KEY -DLITH_VERSION=$VERSION_NAME -DCMAKE_INSTALL_PREFIX=installed
cmake --build . --parallel
2 changes: 1 addition & 1 deletion dist/wasm/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ pushd build_wasm

export QT_HOST_PATH="${QT_ROOT_DIR}/../gcc_64"
export CMAKE_PREFIX_PATH=$QT_ROOT_DIR/lib/cmake
cmake .. -DCMAKE_BUILD_TYPE=Release -DLITH_IMGUR_API_KEY=$IMGUR_API_KEY -DCMAKE_INSTALL_PREFIX=installed -DCMAKE_TOOLCHAIN_FILE=$QT_ROOT_DIR/lib/cmake/Qt6/qt.toolchain.cmake
cmake .. -DCMAKE_BUILD_TYPE=Release -DIMGUR_API_KEY=$IMGUR_API_KEY -DCMAKE_INSTALL_PREFIX=installed -DCMAKE_TOOLCHAIN_FILE=$QT_ROOT_DIR/lib/cmake/Qt6/qt.toolchain.cmake
cmake --build .
cmake --install .
2 changes: 1 addition & 1 deletion modules/Lith/Core/cmakedefs.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#cmakedefine01 LITH_IS_DEBUG_BUILD
#define CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}"

#define LITH_IMGUR_API_KEY "${LITH_IMGUR_API_KEY}"
#define IMGUR_API_KEY "${IMGUR_API_KEY}"

#define LITH_INSTALL_MODULEDIR "${LITH_INSTALL_MODULEDIR}"

Expand Down
2 changes: 1 addition & 1 deletion modules/Lith/Core/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ class LITHCORE_EXPORT Settings : public QObject {
// This is hidden for now
SETTING(bool, terminalLikeChat, true)

SETTING(QString, imgurApiKey, QStringLiteral(LITH_IMGUR_API_KEY))
SETTING(QString, imgurApiKey, QStringLiteral(IMGUR_API_KEY))

// UNUSED SETTINGS
// determine what to do about these later
Expand Down

0 comments on commit 53841b6

Please sign in to comment.