Skip to content

Instantly share code, notes, and snippets.

View SC-One's full-sized avatar
✌️
GoingOn

Heydar Mahmoodi SC-One

✌️
GoingOn
View GitHub Profile
@SC-One
SC-One / QtMinorVersionsCheck.cmake
Last active February 19, 2024 22:49
CMake code for checking qt major minor patch version
# First way todays:
find_package(QT 5.15.2 NAMES Qt6 Qt5 REQUIRED COMPONENTS Core Quick LinguistTools)
############################################################################################
# Alternative way:
if (Qt5Core_FOUND)
if (Qt5Core_VERSION VERSION_LESS 5.15.2)
message(FATAL_ERROR "Minimum supported Qt5 version is 5.15.2! current version: " ${Qt5Core_VERSION})
endif()
@SC-One
SC-One / CMakeLists.txt
Created May 31, 2024 21:06 — forked from baiwfg2/CMakeLists.txt
How to use add_custom_target and add_custom_command correctly in cmake
# References:
# https://cmake.org/cmake/help/latest/command/add_custom_target.html
# https://samthursfield.wordpress.com/2015/11/21/cmake-dependencies-between-targets-and-files-and-custom-commands/
# https://gist.github.com/socantre/7ee63133a0a3a08f3990
# https://stackoverflow.com/questions/24163778/how-to-add-custom-target-that-depends-on-make-install
# https://stackoverflow.com/questions/30719275/add-custom-command-is-not-generating-a-target
# https://stackoverflow.com/questions/26024235/how-to-call-a-cmake-function-from-add-custom-target-command
# https://blog.csdn.net/gubenpeiyuan/article/details/51096777
cmake_minimum_required(VERSION 3.10)
@SC-One
SC-One / CTU.md
Last active July 9, 2024 12:57
Common Terminal Utilities

common utilities for terminal deploy and develope applications


  • finding files that is depend on LibraryA in mac in otool (recursive in a rootFolder)

    find rootFolder -type f -perm +111 -exec sh -c 'otool -L "$1" | grep -q LibraryA && echo "$1"' _ {} \;

  • signing an application (completely) after releasing

codesign --deep --force --verify --verbose --sign "Developer ID Application: Fname LName (KeyChainID)" application.app