Skip to content

Add version.sh script#500

Merged
ferdnyc merged 1 commit intoOpenShot:developfrom
ferdnyc:version-script
May 7, 2020
Merged

Add version.sh script#500
ferdnyc merged 1 commit intoOpenShot:developfrom
ferdnyc:version-script

Conversation

@ferdnyc
Copy link
Copy Markdown
Contributor

@ferdnyc ferdnyc commented Apr 17, 2020

Just like OpenShot/libopenshot-audio#95, this adds a version.sh script at the root of the repo which extracts the PROJECT_VERSION_FULL string from CMakeLists.txt, and for the same reasons:

This is useful for building libopenshot-audio as a Mac Homebrew brew diy project, which allows ad-hoc building of packages that install directly into the Homebrew environment.

e.g.

$ cd libopenshot-audio
$ cmake $(brew diy --name libopenshot-audio --version $(sh ./version.sh)) .
[CMake runs with CMAKE_INSTALL_PREFIX set to $(brew --cellar)/libopenshot-audio/<version>/]
$ cmake --build .
$ cmake --build . --target install
$ brew link libopenshot-audio

...and libopenshot-audio is linked into /usr/local/opt/{lib,include}.

So, same thing with libopenshot:

$ cd libopenshot
$ cmake $(brew diy --name libopenshot --version $(sh ./version.sh)) .
[CMake runs with CMAKE_INSTALL_PREFIX set to $(brew --cellar)/libopenshot/<version>/]
$ cmake --build .
$ cmake --build . --target install
$ brew link libopenshot

One advantage being, you don't have to give the libopenshot cmake run the location of a libopenshot-audio installed this way, since anything in the homebrew space is considered "system-installed". (With the right user environment variables set, at least. brew shellenv can be used to automatically apply that setup.)

@ferdnyc ferdnyc added the build Issues related to compiling or installing libopenshot and its dependencies label Apr 17, 2020
@ferdnyc
Copy link
Copy Markdown
Contributor Author

ferdnyc commented May 7, 2020

Merging this, as it has no effect currently unless it's manually invoked.

@ferdnyc ferdnyc merged commit 6e7ad23 into OpenShot:develop May 7, 2020
@ferdnyc ferdnyc deleted the version-script branch May 7, 2020 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Issues related to compiling or installing libopenshot and its dependencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant