Skip to content

Commit dcdccef

Browse files
author
Clement Champetier
committed
CMake: build cpp apps
* Add a CMakeList.txt for each app.
1 parent 40c4260 commit dcdccef

File tree

9 files changed

+73
-0
lines changed

9 files changed

+73
-0
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -fPIC -pg -g")
1919
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fPIC -O3")
2020

2121
add_subdirectory(src)
22+
add_subdirectory(app)

app/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
add_subdirectory(cpp/avInfo)
2+
add_subdirectory(cpp/avMeta)
3+
add_subdirectory(cpp/avplay)
4+
add_subdirectory(cpp/avTranscoder)
5+
add_subdirectory(cpp/genericProcessor)
6+
add_subdirectory(cpp/optionChecker)
7+
add_subdirectory(cpp/presetChecker)

app/cpp/avInfo/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
### cpp/avInfo
2+
3+
include_directories(${AVTRANSCODER_SRC_PATH})
4+
add_executable(avinfo avInfo.cpp)
5+
target_link_libraries(avinfo avtranscoder-shared)
6+
7+
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/avinfo DESTINATION "bin/")
8+
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/avinfo.man DESTINATION "share/man/man1/")

app/cpp/avMeta/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
### cpp/avMeta
2+
3+
include_directories(${AVTRANSCODER_SRC_PATH} ${FFMPEG_INCLUDE_DIR})
4+
add_executable(avmeta avMeta.cpp)
5+
target_link_libraries(avmeta avtranscoder-shared)
6+
7+
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/avmeta DESTINATION "bin/")
8+
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/avmeta.man DESTINATION "share/man/man1/")

app/cpp/avTranscoder/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
### cpp/avTranscoder
2+
3+
include_directories(${AVTRANSCODER_SRC_PATH} ${FFMPEG_INCLUDE_DIR})
4+
add_executable(avtranscoder avTranscoder.cpp)
5+
target_link_libraries(avtranscoder avtranscoder-shared)
6+
7+
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/avtranscoder DESTINATION "bin/")
8+
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/av++.man DESTINATION "share/man/man1/")

app/cpp/avplay/CMakeLists.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
### cpp/avplay
2+
3+
find_package(OpenGL REQUIRED)
4+
find_package(GLUT REQUIRED)
5+
6+
include_directories(${AVTRANSCODER_SRC_PATH} ${FFMPEG_INCLUDE_DIR})
7+
include_directories( ${OPENGL_INCLUDE_DIRS} ${GLUT_INCLUDE_DIRS} )
8+
9+
file(GLOB AVPLAY_SRC_FILES "*.cpp" "*.hpp")
10+
add_executable(avplay ${AVPLAY_SRC_FILES})
11+
target_link_libraries(avplay avtranscoder-shared ${OPENGL_LIBRARIES} ${GLUT_LIBRARY})
12+
13+
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/avplay DESTINATION "bin/")
14+
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/avplayer.man DESTINATION "share/man/man1/")
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
### cpp/avProcessor
2+
3+
include_directories(${AVTRANSCODER_SRC_PATH} ${FFMPEG_INCLUDE_DIR})
4+
add_executable(avprocessor genericProcessor.cpp)
5+
target_link_libraries(avprocessor avtranscoder-shared)
6+
7+
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/avprocessor DESTINATION "bin/")
8+
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/avprocessor.man DESTINATION "share/man/man1/")

app/cpp/optionChecker/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
### cpp/avOptionChecker
2+
3+
include_directories(${AVTRANSCODER_SRC_PATH} ${FFMPEG_INCLUDE_DIR})
4+
# Add C++11 flag
5+
set(CMAKE_CXX_FLAGS "-std=c++0x")
6+
add_executable(avoptionchecker optionChecker.cpp)
7+
target_link_libraries(avoptionchecker avtranscoder-shared)
8+
9+
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/avoptionchecker DESTINATION "bin/")

app/cpp/presetChecker/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
### cpp/avPresetChecker
2+
3+
include_directories(${AVTRANSCODER_SRC_PATH} ${FFMPEG_INCLUDE_DIR})
4+
# Add C++11 flag
5+
set(CMAKE_CXX_FLAGS "-std=c++0x")
6+
add_executable(avpresetchecker presetChecker.cpp)
7+
target_link_libraries(avpresetchecker avtranscoder-shared)
8+
9+
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/avpresetchecker DESTINATION "bin/")
10+
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/avprofiles.man DESTINATION "share/man/man1/")

0 commit comments

Comments
 (0)