-
Notifications
You must be signed in to change notification settings - Fork 50
CMake build system #79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
MarcAntoine-Arnaud
merged 32 commits into
avTranscoder:master
from
cchampet:build_CMake
Sep 10, 2014
Merged
CMake build system #79
MarcAntoine-Arnaud
merged 32 commits into
avTranscoder:master
from
cchampet:build_CMake
Sep 10, 2014
Conversation
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
Member
cchampet
commented
Sep 3, 2014
- Build AvTranscoder.
- Build cpp apps.
- Enhancement: generate java binding (java files, class files, and jar file) in a single build !
- Currently keep Scons.
- Scons to CMake #75
* Same problem with scons about the java binding : need to generate the java files, reconfigure, and build again to generate class files and the jar. Need to find a solution to skip the reconfigure... * Useful flags to configure using CMake: * CMAKE_BUILD_TYPE: Release / Debug * CMAKE_INSTALL_PREFIX: /path/to/install * FFMPEG_INCLUDE_DIR * FFMPEG_LIBRARY_DIR * Name of output librairies: * avtranscoder.a * avtranscoder.so (link + .so with version) * avtranscoder-py.so (without link) * avtranscoder-java.so (without link)
* Add a CMakeList.txt for each app.
Do not need to reconfigure the make file to be able to install libraries.
* Do not need to reconfigure the make file to be able to generate class files and jar file. * The solution was to add a custom command as a post build of the java binding which generate java files.
f05a77a
to
7373f56
Compare
Check if FFmpeg or libav dependency, and define variable to manage includes in source code.
set(AVTRANSCODER_SRC_PATH "${PROJECT_SOURCE_DIR}/src" PARENT_SCOPE) | ||
file(GLOB_RECURSE AVTRANSCODER_SRC_FILES "AvTranscoder/*.cpp" "AvTranscoder/*.hpp") | ||
|
||
# Get FFMPEG from parameters |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to use find_package FFMPEG.
You can reuse some basic utility functions from tuttle.
TODO: change the .travis file to use cmake. |
* Custom utilities are: * AvTranscoderMacros.cmake: macros, included in all cmake files. * FindFFmpeg.cmake: to get FFmpeg package (by specify a list of components, check the FFmpeg version, get FFmpeg from command line if there are parameters, etc...).
* Update FindFFmpeg.cmake : do not raise error if a component is not found (warning).
* If REQUIRED is specified for modules, raise error if a module is not found.
* No need to specified the jdk version (it could be different on an other computer). * Use the JAVA_HOME environment variable to get the jdk (make sure your env. is correctly set).
* Library linked by target "avplay".
…into build_CMake
* Define preprocessor macros: * AVTRANSCODER_VERSION_MAJOR. * AVTRANSCODER_VERSION_MINOR. * AVTRANSCODER_VERSION_MICRO. * In CMake AVTRANSCODER_VERSION is available.
* Get javac executable from Java_JAVAC_EXECUTABLE. * Get jar executable from Java_JAR_EXECUTABLE.
499bb3e
to
a127ede
Compare
It could be g++, clang, msvc...
* Permissions are: * owner: read / writer / execute. * group: read / execute. * all: read / execute.
* Rename xxx.man to xxx.1 (manuals for users).
Rename avtranscoder-jar.jar to avtranscoder.jar.
Versioning in three steps: * libavtranscoder.so -> libavtranscoder.so.0 * libavtranscoder.so.0 -> libavtranscoder.so.0.2.1 * libavtranscoder.so.0.2.1
* Generate python binding if PYTHONLIBS_FOUND. * Generate java binding if JAVA_FOUND AND JNI_FOUND. * So theses packages are not required to build AvTranscoder.
* If CMake 2.8.8, can get python version from PYTHONLIBS_VERSION_STRING. * Else, get python version from include path.
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.