cinecert / asdcplib

AS-DCP and AS-02 File Access Library
Other
70 stars 54 forks source link

Add new cmake option to build static libs #68

Closed ghost closed 3 years ago

ghost commented 3 years ago

What does this PR do?

Add new CMake option to build static libraries

Explanation

Sometime it is useful to build static libraries instead of shared ones and link them directly to a binary.

Solution

Introduce new CMake option BUILD_STATIC_LIBS

How to test?

Build shared libs

  1. mkdir build
  2. cd build
  3. cmake ..

One should be able to see ASDCP shared libs (*.so files on Linux)

Build static libs

  1. mkdir build
  2. cd build
  3. cmake -DBUILD_STATIC_LIBS=ON ..

One should be able to see ASDCP static libs (*.a files on Linux)

IMFTool commented 3 years ago

Specifying building shared or static libs is already implemented using BUILD_SHARED_LIBS. I have created a PR that allows for setting BUILD_SHARED_LIBS on the command line: https://github.com/cinecert/asdcplib/pull/85/commits/1b851da3d111beca7acd376e00c6179c179045ba (i.e. mkdir build && cd build && cmake -DBUILD_SHARED_LIBS=OFF .. for building static build libs) This should serve the purpose of this PR. @Iyer-VivekAnand OK for you?

Iyer-VivekAnand commented 3 years ago

Specifying building shared or static libs is already implemented using BUILD_SHARED_LIBS. I have created a PR that allows for setting BUILD_SHARED_LIBS on the command line: 1b851da (i.e. mkdir build && cd build && cmake -DBUILD_SHARED_LIBS=OFF .. for building static build libs) This should serve the purpose of this PR. @Iyer-VivekAnand OK for you?

That should be okay

jhursty commented 3 years ago

Closed; superseded by #85