Skip to content

Commit

Permalink
Add build option BUILD_SHARED_LIBRARY
Browse files Browse the repository at this point in the history
  • Loading branch information
dguglielmi committed May 9, 2024
1 parent b92b7c3 commit 8cdd099
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,12 @@ file(GLOB AP4_HEADERS
${SOURCE_METADATA}/*.h
)

add_library(ap4 STATIC ${AP4_SOURCES})
option(BUILD_SHARED_LIBRARY "Build as a shared library" OFF)
if(BUILD_SHARED_LIBRARY)
add_library(ap4 SHARED ${AP4_SOURCES})
else()
add_library(ap4 STATIC ${AP4_SOURCES})
endif()
target_include_directories(ap4 PUBLIC
${AP4_INCLUDE_DIRS}
)
Expand Down

0 comments on commit 8cdd099

Please sign in to comment.