Commit 50376482 authored by NzSN's avatar NzSN

CMakeLists.txt bug fix: libshmproto.a not include libav.

parent f0d849ab
......@@ -15,6 +15,8 @@ option(enable_movmem "Enable/Disable MovMemProto" ON)
option(DEBUG "Only enable during development" OFF)
include_directories(${INCLUDE})
if(DEBUG)
# Google Test
include(FetchContent)
......@@ -70,14 +72,28 @@ install(FILES ${ROOT}/src/proto/proto.h
${ROOT}/src/utils.h
${ROOT}/src/proto/proto.h
${ROOT}/src/proto/movMemProto.h
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
DESTINATION include)
target_link_libraries(shmproto
${CMAKE_SOURCE_DIR}/lib/lib/libavformat.a
${CMAKE_SOURCE_DIR}/lib/lib/libavcodec.a
${CMAKE_SOURCE_DIR}/lib/lib/libavdevice.a
${CMAKE_SOURCE_DIR}/lib/lib/libavfilter.a
${CMAKE_SOURCE_DIR}/lib/lib/libavutil.a
${CMAKE_SOURCE_DIR}/lib/lib/libswresample.a
${CMAKE_SOURCE_DIR}/lib/lib/libswscale.a
${CMAKE_SOURCE_DIR}/lib/lib/libpostproc.a
)
target_link_libraries(shmproto z)
target_link_libraries(shmproto x264)
target_link_libraries(shmproto lzma)
if(DEBUG)
# Tests
set(Tests ${ROOT}/tests)
set(TestCases
${Tests}/ioctxTestCases.cc)
${Tests}/ioctxTestCases.cc)
add_executable(unittest ${TestCases} ${SRC_Files})
include_directories(${INCLUDE})
add_custom_command(TARGET unittest PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
......@@ -102,3 +118,4 @@ target_link_libraries(unittest
target_link_libraries(unittest z)
target_link_libraries(unittest x264)
target_link_libraries(unittest lzma)
endif()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment