Repository navigation
macOS make: APP_VERSION / APP_BUILD for the app's Info.plist (from #3394) - #8592
Merged
Merged
Conversation
Set APP_VERSION (CFBundleShortVersionString, shown in the About window)
and APP_BUILD (CFBundleVersion) in a project's config.make or on the
make command line; defaults 1.0 and 1. The version was hardcoded to 1.0,
and CFBundleVersion was left as the literal ${CURRENT_PROJECT_VERSION}.
Based on openframeworks#3394.
Co-authored-by: Vincent Donnefort <vdonnefort@gmail.com>
danoli3
added a commit
to danoli3/openFrameworks
that referenced
this pull request
Oct 16, 2026
Same names as the makefiles' config.make (openframeworks#8592): APP_VERSION sets CFBundleShortVersionString (default: project(... VERSION), else 1.0) and APP_BUILD sets CFBundleVersion (default 1), also as Xcode's MARKETING_VERSION / CURRENT_PROJECT_VERSION. Based on openframeworks#3394. Co-authored-by: Vincent Donnefort <vdonnefort@gmail.com>
This was referenced Oct 16, 2026
Merged
danoli3
added a commit
to danoli3/openFrameworks
that referenced
this pull request
Oct 28, 2026
Same names as the makefiles' config.make (openframeworks#8592): APP_VERSION sets CFBundleShortVersionString (default: project(... VERSION), else 1.0) and APP_BUILD sets CFBundleVersion (default 1), also as Xcode's MARKETING_VERSION / CURRENT_PROJECT_VERSION. Based on openframeworks#3394. Co-authored-by: Vincent Donnefort <vdonnefort@gmail.com>
danoli3
added a commit
that referenced
this pull request
Oct 30, 2026
…n, Linux, Windows) (#8586) * CMake build system for the core and apps libs/openFrameworksCompiled/project/CMake builds the openFrameworks core and apps on macOS, iOS, tvOS, Emscripten, Linux (linux64, linuxaarch64, linuxarmv7l, linuxarmv6l), Visual Studio and MSYS2, mirroring the makefiles and IDE projects: the same sources, defines, flags and third-party libraries per platform, apps built into bin/, and the core in libs/openFrameworksCompiled/lib/<platform> with the names the existing builds use. Android keeps its own CMake for now. - openFrameworks.cmake: entry point for apps and the core project - CMakeLists.txt: the core library project - OFCore.cmake: core sources, third-party libs, the openFrameworks and openFrameworks::deps targets; apps link the prebuilt core, or build it first if it isn't there (OF_BUILD_CORE=ON forces that) - OFAddons.cmake: addons from their folders and addon_config.mk like the makefiles, or from explicit lists (of_target_addon_files, for the Project Generator) - OFApp.cmake: of_add_app() - platform/*.cmake: per platform excludes, defines, flags, libraries and app output (.app bundles with Info.plist and icon, bin/em/<app> for Emscripten, xcframeworks and bin/data in the bundle on iOS / tvOS) scripts/templates/cmake/CMakeLists.txt is the app template; generated CMakeLists.txt in examples are ignored like the Makefiles. * CMake Emscripten: use the makefiles' option names PROJECT_EMSCRIPTEN_WASM (32 / 64), PROJECT_EMSCRIPTEN_TOTAL_MEMORY, PROJECT_EMSCRIPTEN_EMBIND_AOT and PROJECT_EMSCRIPTEN_TEMPLATE, as in a project's config.make, so the Project Generator writes the same setting for both. wasm64 builds the core into lib/emscripten/WASM64 like the makefiles; EMSCRIPTEN_MEMORY64 still selects 64. * CMake: APP_VERSION and APP_BUILD for macOS / iOS / tvOS Info.plist Same names as the makefiles' config.make (#8592): APP_VERSION sets CFBundleShortVersionString (default: project(... VERSION), else 1.0) and APP_BUILD sets CFBundleVersion (default 1), also as Xcode's MARKETING_VERSION / CURRENT_PROJECT_VERSION. Based on #3394. Co-authored-by: Vincent Donnefort <vdonnefort@gmail.com> * CI: build-cmake job for linux64, macOS and VS x64 scripts/ci/cmake/build.sh builds the core (Release and Debug) with the CMake project, then emptyExample (Release and Debug), graphicsExample, guiExample and allAddonsExample. Each example's CMakeLists.txt comes from projectGenerator -t cmake when --pg is given (linux64 and VS use the nightly PG), otherwise from scripts/templates/cmake/CMakeLists.txt. A failed step fails the job with an ::error annotation, and each app must end up in bin/. * Match the Emscripten CMake link to the makefile Link the core archive with --whole-archive. Keep wasm32 and wasm64 libraries in separate folders, default embind AOT off, and drop MAIN_MODULE so audio worklets link. * Define UNICODE for the Visual Studio CMake build The vcxproj sets CharacterSet to Unicode. Without UNICODE and _UNICODE, Win32 calls stay on the ANSI entry points and the wide paths in ofFileUtils and ofSystemUtils do not compile. * CMake VS: find the app icon from icon.rc icon.rc names icon.ico / icon_debug.ico, which live in project/vs; the VS template adds that folder to the resource compiler's include path, so do the same for the CMake app target. * Keep config-specific addon libraries on the Visual Studio link Release and Debug libs are generator expressions ending in .lib>. The addon filter only kept paths ending in .lib, so ofxAssimpModelLoader and ofxOpenCv linked with no libraries. * CMake: preserve configuration-dependent addon library paths Keep platform-generated library expressions intact during addon path expansion and filtering. Verify split Debug/Release directories, flat paired libraries and shared libraries in the CMake CI entry point. * CI: build-cmake for linuxaarch64 and Emscripten linuxaarch64 (64-bit Raspberry Pi OS / arm64 Linux) builds natively on ubuntu-24.04-arm with the aarch64 libs and the nightly arm64 projectGenerator. Emscripten builds in the same emsdk image as build-emscripten, configured through emcmake, with emptyExample (Release, Debug), graphicsExample and guiExample. scripts/ci/cmake/build.sh takes CMAKE_WRAPPER (prefix for the configure step) and OF_CMAKE_EXAMPLES (replaces the example list), and accepts the Emscripten output bin/em/<app>/index.html. * CMake Emscripten: link the core whole-archive as a link option LINKER: is only expanded in link options. In target_link_libraries it went to wasm-ld as -lLINKER:--whole-archive,... and the link failed. Pass it with target_link_options and add the archive to INTERFACE_LINK_DEPENDS so apps relink when the core changes. CI: install libblas-dev / liblapack-dev for build-cmake (linuxaarch64); ofxOpenCv links -lblas -llapack there, which rpi-build gets from multistrap. * CMake: OF_BUILD_TESTS registers the unit tests with CTest -DOF_BUILD_TESTS=ON on the core build adds every test in tests/ (desktop platforms) as an app and registers it with add_test, so ctest runs them. Each test runs from its executable's folder like make RunDebug (bin/, or Contents/MacOS on macOS, which the fileUtils data path checks expect). of_add_app takes PROJECT_DIR so projects without a CMakeLists.txt (tests, examples) can be added; the addon and platform helpers read the project folder from OF_PROJECT_DIR. OFProjects.cmake walks <root>/<group>/<project> and skips groups for other platforms. jsonTest includes <nlohmann/json.hpp> like ofJson.h; "json.hpp" only built with make, which adds every libs/*/include subfolder. CI: build-cmake (linux64, macos) builds the tests in Debug and runs ctest. Based on the CTest setup (define_test) in #7524. Co-authored-by: HerrNamenlos123 <herrnamenlos123@gmail.com> * CMake: OF_BUILD_EXAMPLES adds every example and build_all_examples -DOF_BUILD_EXAMPLES=ON on the core build adds every example for the platform as an app (EXCLUDE_FROM_ALL, built into its own bin/) and a build_all_examples target. USE_FOLDERS groups the targets as openFrameworks, examples/<group> and tests/<group>, so one Visual Studio solution, Xcode project or CLion project opens them all. On macOS all 157 examples build (svgParseExample, svgSaveExample and yunetFaceDetection need the addons.make files they're missing on master). Based on the examples setup (define_example, build_all_examples, IDE folders) in #7524. Co-authored-by: HerrNamenlos123 <herrnamenlos123@gmail.com> * CMake: OF_PRECOMPILED_HEADER precompiles ofMain.h for apps -DOF_PRECOMPILED_HEADER=ON precompiles ofMain.h for the app's own src/ C++ files. Addon and library sources skip it (SKIP_PRECOMPILE_HEADERS), so third-party code compiles as it does in the other build systems. On macOS, where C++ is compiled as Objective-C++, the header is built as Objective-C++ too, otherwise clang rejects it. CI: build-cmake (linuxaarch64, vs-x64) builds with the precompiled header, so GCC and MSVC are covered. build.sh reports the first output it finds. Based on the precompiled header setup documented in #7524. Co-authored-by: HerrNamenlos123 <herrnamenlos123@gmail.com> * Use ccache for CMake builds when it is installed The core project, the app template, and the Linux and Android toolchains prefix the compilers with ccache. -DOF_USE_CCACHE=OFF turns that off, and a launcher that is already set is left alone. * Use the linux/<arch> library folders in CMake The Linux archives now extract to libs/*/lib/linux/64, linux/aarch64, linux/armv6l and linux/armv7l. CMake looks there first and still accepts a flat linux64 folder. addon_config.mk sections follow the same names, including the generic linux: section. The CMake CI job downloads with -a 64 -g 10 and installs from scripts/ci/linux/64. The Emscripten job uses emsdk 6.0.13, the same image as the makefile job. * Run the CMake macOS job with Xcode 27.1 The current curl archive references pipe2. The makefile macOS job links that archive on the xcode-27 runner. The MSVC addon fixture sets OF_PLATFORM and not OF_LIB_SUBPATHS, so library lookup uses the platform folder in that case. * Link the bundled GLFW on Linux ofAppGLFWWindow calls glfwGetPlatform. Ubuntu's libglfw3-dev is 3.3 and does not declare it. The makefile leaves pkg-config glfw3 commented out and links libs/glfw, whose headers are 3.4. * Add the KissFFT header directory ofOpenALSoundPlayer includes kiss_fftr.h. Apothecary installs that header in libs/kiss/include/kissfft. The makefile adds every subdirectory of libs/*/include. * Look for KissFFT headers under include/include Apothecary copies the install tree into libs/kiss/include, so kiss_fftr.h is at include/include/kissfft. The makefile finds it by adding every subdirectory. The previous check looked only in include/kissfft. * CMake README: requirements, and the projectGenerator versions with the cmake template --------- Co-authored-by: Vincent Donnefort <vdonnefort@gmail.com> Co-authored-by: HerrNamenlos123 <herrnamenlos123@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings back the idea from #3394 by @vdonnefort (2014): set a macOS app's version from the project's
config.make. The files that PR changed have since been rewritten, so this re-implements it on the current makefiles; Vincent is credited as co-author.Change
config.macos.default.mk/config.osx.default.mk:APP_VERSION(default1.0) →CFBundleShortVersionString, the version in the About window. It was hardcoded to1.0.APP_BUILD(default1) →CFBundleVersion. Until now this was left as the literal text${CURRENT_PROJECT_VERSION}in every make-built app.scripts/templates/macos/config.make/osx/config.make: documented, commented-out defaults.Usage, in
config.make:or
make Release APP_VERSION=2.3.4 APP_BUILD=42.Tested (macOS, make, emptyExample)
1.01(was${CURRENT_PROJECT_VERSION})2.3.4423.0.17plutil -lintpasses on the generated plist. The same names are used by the CMake build (#8586).Supersedes #3394.