[CMakeLists] In all CMakeLists, add properties folder which belonged

[mpi_test.c] Eliminate warning

git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@184 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
DingWei
2008-01-24 21:07:22 +00:00
parent aa046a7158
commit 72251b9c56
12 changed files with 68 additions and 5 deletions

View File

@@ -40,6 +40,11 @@ include(CheckFunctionExists)
include(CheckSymbolExists)
include(CheckCXXCompilerFlag)
# ----------------------------------------------------------------------------
# set property to classify library kinds
# ----------------------------------------------------------------------------
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "CMakeTargets")
# ----------------------------------------------------------------------------
# enable test in this project
# ----------------------------------------------------------------------------

View File

@@ -30,7 +30,7 @@ add_library(mpp STATIC
mpi_impl.cpp
mpi.cpp
)
set_target_properties(mpp PROPERTIES FOLDER "mpp")
add_subdirectory(legacy)
add_subdirectory(test)

View File

@@ -7,8 +7,9 @@ add_library(mpp_codec STATIC
mpp_buf_slot.cpp
mpp_enc.cpp
mpp_dec.cpp
)
set_target_properties(mpp_codec PROPERTIES FOLDER "mpp/codec")
add_subdirectory(dec)
add_subdirectory(enc)

View File

@@ -1 +1,28 @@
# vim: syntax=cmake
# h264 decoder api
set(H264D_API
../../inc/h264d_api.h
)
# h264 decoder header
set(H264D_HDR
)
# h264 decoder sourse
set(H264D_SRC
h264d_api.c
)
add_library(codec_h264d STATIC
${H264D_API}
${H264D_HDR}
${H264D_SRC}
)
set_target_properties(codec_h264d PROPERTIES FOLDER "mpp/codec")

View File

@@ -5,7 +5,7 @@
add_library(mpp_hal STATIC
mpp_hal.cpp
)
set_target_properties(mpp_hal PROPERTIES FOLDER "mpp/hal")
add_subdirectory(rkdec/h264d)
add_subdirectory(rkdec/h265d)

View File

@@ -1 +1,27 @@
# vim: syntax=cmake
# hal h264 decoder api
set(HAL_H264D_API
../../inc/hal_h264d_api.h
)
# hal h264 header
set(HAL_H264D_HDR
)
# hal h264 decoder sourse
set(HAL_H264D_SRC
hal_h264d_api.c
)
add_library(hal_h264d STATIC
${HAL_H264D_API}
${HAL_H264D_HDR}
${HAL_H264D_SRC}
)
set_target_properties(hal_h264d PROPERTIES FOLDER "mpp/hal")

View File

@@ -8,5 +8,5 @@ add_library(mpp_legacy STATIC
vpu_api.cpp
vpu_api_legacy.cpp
)
set_target_properties(mpp_legacy PROPERTIES FOLDER "mpp/legacy")
target_link_libraries(mpp_legacy osal)

View File

@@ -14,6 +14,7 @@ macro(add_mpp_test module)
if(${test_tag})
add_executable(${test_name} ${test_name}.c)
target_link_libraries(${test_name} mpp)
set_target_properties(${test_name} PROPERTIES FOLDER "mpp/test")
install(TARGETS ${test_name} RUNTIME DESTINATION ${TEST_INSTALL_DIR})
endif()
endmacro()

View File

@@ -33,4 +33,5 @@ else()
target_link_libraries(osal pthread)
endif()
set_target_properties(osal PROPERTIES FOLDER "osal")
add_subdirectory(test)

View File

@@ -14,6 +14,7 @@ macro(add_mpp_osal_test module)
if(${test_tag})
add_executable(${test_name} ${test_name}.c)
target_link_libraries(${test_name} osal)
set_target_properties(${test_name} PROPERTIES FOLDER "osal/test")
install(TARGETS ${test_name} RUNTIME DESTINATION ${TEST_INSTALL_DIR})
add_test(NAME ${test_name} COMMAND ${test_name})
endif()

View File

@@ -14,6 +14,7 @@ macro(add_mpp_test module)
if(${test_tag})
add_executable(${test_name} ${test_name}.c)
target_link_libraries(${test_name} mpp)
set_target_properties(${test_name} PROPERTIES FOLDER "test")
install(TARGETS ${test_name} RUNTIME DESTINATION ${TEST_INSTALL_DIR})
add_test(NAME ${test_name} COMMAND ${test_name})
endif()

View File

@@ -55,7 +55,7 @@ int main()
mpp_env_set_u32("mpi_debug", 0x1);
buf = malloc(size);
buf = (char *)malloc(size);
if (NULL == buf) {
mpp_err("mpi_test malloc failed\n");
goto MPP_TEST_FAILED;