mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-12-26 11:17:44 +01:00
[cmake]: expand tab to space, add Android link configure for osal
git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@22 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
parent
46dd99fcab
commit
3cfb36bca1
2 changed files with 20 additions and 13 deletions
|
|
@ -44,11 +44,11 @@ include(CheckCXXCompilerFlag)
|
|||
# add debug define in project
|
||||
# ----------------------------------------------------------------------------
|
||||
if(NOT $(CMAKE_BUILD_TYPE) MATCHES “Release”)
|
||||
option(RK_DEBUG "Enable run-time debug mode(debugging)" ON)
|
||||
if(RK_DEBUG)
|
||||
add_definitions(-DRK_DEBUG)
|
||||
message(STATUS "rk_mpp debug mode is enabled")
|
||||
endif()
|
||||
option(RK_DEBUG "Enable run-time debug mode(debugging)" ON)
|
||||
if(RK_DEBUG)
|
||||
add_definitions(-DRK_DEBUG)
|
||||
message(STATUS "rk_mpp debug mode is enabled")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
|
|
@ -271,7 +271,7 @@ endif()
|
|||
# look for stdint.h
|
||||
# ----------------------------------------------------------------------------
|
||||
if(MSVC)
|
||||
check_include_files(stdint.h HAVE_STDINT_H)
|
||||
check_include_files(stdint.h HAVE_STDINT_H)
|
||||
if(NOT HAVE_STDINT_H)
|
||||
include_directories(osal/window)
|
||||
endif(NOT HAVE_STDINT_H)
|
||||
|
|
|
|||
|
|
@ -12,15 +12,15 @@ endif()
|
|||
set(OSAL_HDR
|
||||
inc/rk_list.h
|
||||
inc/rk_thread.h
|
||||
inc/rk_log.h
|
||||
os_log.h
|
||||
inc/rk_log.h
|
||||
os_log.h
|
||||
)
|
||||
|
||||
set(OSAL_SRC
|
||||
rk_list.cpp
|
||||
rk_log.cpp
|
||||
${OS_DIR}/os_log.c
|
||||
)
|
||||
rk_log.cpp
|
||||
${OS_DIR}/os_log.c
|
||||
)
|
||||
|
||||
add_library(osal STATIC
|
||||
${OSAL_SRC} ${OSAL_HDR}
|
||||
|
|
@ -41,7 +41,7 @@ if(MSVC)
|
|||
set_target_properties(pthread PROPERTIES
|
||||
IMPORTED_LOCATION
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/window/pthread/lib/x64/pthreadVC2.lib")
|
||||
else()
|
||||
else()
|
||||
set(WIN32_ARCH "x86")
|
||||
endif()
|
||||
include_directories("${WIN32_PTHREAD_LIB_DIRS}/${WIN32_ARCH}")
|
||||
|
|
@ -53,7 +53,14 @@ if(MSVC)
|
|||
IMPORTED_IMPLIB
|
||||
"${WIN32_PTHREAD_LIB_DIRS}/${WIN32_ARCH}/pthreadVC2.lib")
|
||||
endif()
|
||||
target_link_libraries(osal pthread)
|
||||
|
||||
if(ANDROID)
|
||||
# in Android pthread is in libc, also need liblog
|
||||
target_link_libraries(osal log m c )
|
||||
else()
|
||||
target_link_libraries(osal pthread)
|
||||
endif()
|
||||
|
||||
install(TARGETS osal
|
||||
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
|
||||
ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue