Skip to content

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
merged 32 commits into from
Sep 10, 2014
Merged

Conversation

cchampet
Copy link
Member

@cchampet 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

Clement Champetier added 4 commits September 3, 2014 13:36
* 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.
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
Copy link
Contributor

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.

@fabiencastan
Copy link
Contributor

TODO: change the .travis file to use cmake.

Clement Champetier added 12 commits September 8, 2014 11:32
* 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".
* 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.
Clement Champetier added 7 commits September 9, 2014 15:49
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.
Clement Champetier added 7 commits September 10, 2014 15:45
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.
MarcAntoine-Arnaud added a commit that referenced this pull request Sep 10, 2014
@MarcAntoine-Arnaud MarcAntoine-Arnaud merged commit 2ad9fbd into avTranscoder:master Sep 10, 2014
@cchampet cchampet deleted the build_CMake branch September 17, 2014 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants