[osal/rk_thread]: fix compiling error on rk_thread

add window debug run note to readme.txt

git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@6 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
ChenHengming
2015-07-28 03:00:50 +00:00
parent 3819a8823a
commit 6f8eb89bc6
3 changed files with 13 additions and 3 deletions

View File

@@ -18,19 +18,25 @@ add_library(osal STATIC
# On window import win32 pthread library
# ----------------------------------------------------------------------------
if(MSVC)
set(WIN32_PTHREAD_INCLUDE_DIRS window/pthread/inc)
set(WIN32_PTHREAD_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/window/pthread/inc")
include_directories(${WIN32_PTHREAD_INCLUDE_DIRS})
add_library(pthread STATIC IMPORTED)
message(STATUS "platform X86 ${X86} X64 ${X64}")
set(WIN32_PTHREAD_LIB_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/window/pthread/lib")
set(WIN32_PTHREAD_DLL_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/window/pthread/dll")
if(X64)
set(WIN32_ARCH "x64")
set_target_properties(pthread PROPERTIES
IMPORTED_LOCATION
"${CMAKE_CURRENT_SOURCE_DIR}/window/pthread/lib/x64/pthreadVC2.lib")
else()
set(WIN32_ARCH "x86")
endif()
include_directories("${WIN32_PTHREAD_LIB_DIRS}/${WIN32_ARCH}")
include_directories("${WIN32_PTHREAD_DLL_DIRS}/${WIN32_ARCH}")
set_target_properties(pthread PROPERTIES
IMPORTED_LOCATION
"${CMAKE_CURRENT_SOURCE_DIR}/window/pthread/lib/x86/pthreadVC2.lib")
endif()
"${WIN32_PTHREAD_LIB_DIRS}/${WIN32_ARCH}/pthreadVC2.lib")
endif()
target_link_libraries(osal pthread)
install(TARGETS osal

View File

@@ -33,6 +33,7 @@
#include <windows.h>
#include "pthread.h"
#define sleep Sleep
#pragma comment(lib, "pthreadVC2.lib")
#else

View File

@@ -14,6 +14,9 @@ c. header file should not contain any relative path or absolute path, all includ
a. for cross platform compiling use cmake as the compiling management system.
b. use cmake out-of-source build, final binary and library will be install to out/ directory.
NOTE:
1. when run on window pthreadVC2.dll needed to be copied to the system directory.
---- top
|
|----- build CMake out-of-source build directory