remove tvhal's static libs

This commit is contained in:
houzh 2022-12-07 01:30:22 +00:00
parent 7b8f2066ad
commit 72b320db42
46 changed files with 135 additions and 160 deletions

View File

@ -6,7 +6,6 @@ set(CMAKE_CXX_STANDARD 11)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
include(cmake/common_functions.cmake)
include(cmake/options.cmake)
message("====================================")
set(CMAKE_PREFIX_PATH ${CMAKE_BINARY_DIR})
set(CMAKE_INSTALL_MANDIR ${CMAKE_PREFIX_PATH}/man)
@ -54,22 +53,3 @@ add_custom_target(appdevops
COMMENT "Creating Application develop environment ..."
)
# Packaging
set(CPACK_PACKAGE_NAME ${PROJECT_NAME})
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_NAME} Package.")
set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${VERSION_PATCH})
set(CPACK_PACKAGE_VERSION "1.0")#${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
if (WIN32)
set(CPACK_GENERATOR ZIP)
else()
set(CPACK_GENERATOR TGZ)
endif()
set(CPACK_STRIP_FILES TRUE)
include(CPack)

View File

@ -1,3 +1,13 @@
# CMake does not automatically add --whole-archive when building shared objects from
# a list of convenience libraries. This can lead to missing symbols in the final output.
# We add --whole-archive to all libraries manually to prevent the linker from trimming
# symbols that we actually need later.
macro(ADD_WHOLE_ARCHIVE_TO_LIBRARIES _list_name)
foreach (library IN LISTS ${_list_name})
list(APPEND ${_list_name}_TMP -Wl,--whole-archive ${library} -Wl,--no-whole-archive)
endforeach ()
set(${_list_name} "${${_list_name}_TMP}")
endmacro()
function(CreatePAK project ResourceDIR PakPath rhpath)
add_custom_target(${project}_assets

View File

@ -13,7 +13,7 @@ find_library(UNIBREAK_LIBRARIES
${PC_ZLIB_LIBRARY_DIRS}
)
message("UNIBREAK_LIBRARIES=${UNIBREAK_LIBRARIES} UNIBREAK_INCLUDE_DIRS=${UNIBREAK_INCLUDE_DIRS} PC_UNIBREAK_VERSION=${PC_UNIBREAK_VERSION}")
#message("UNIBREAK_LIBRARIES=${UNIBREAK_LIBRARIES} UNIBREAK_INCLUDE_DIRS=${UNIBREAK_INCLUDE_DIRS} PC_UNIBREAK_VERSION=${PC_UNIBREAK_VERSION}")
if(UNIBREAK_INCLUDE_DIRS AND UNIBREAK_LIBRARIES)
set(UNIBREAK_FOUND TRUE)
set(UNIBREAK_LIBRARY ${UNIBREAK_LIBRARIES})

View File

@ -13,7 +13,7 @@ find_library(ZIP_LIBRARIES
${PC_ZIP_LIBRARY_DIRS}
)
#message("ZIP_LIBRARIES=${ZIP_LIBRARIES} ZIP_INCLUDE_DIRS=${ZIP_INCLUDE_DIRS} PC_ZIP_VERSION=${PC_ZIP_VERSION}")
message("ZIP_LIBRARIES=${ZIP_LIBRARIES} ZIP_INCLUDE_DIRS=${ZIP_INCLUDE_DIRS} PC_ZIP_VERSION=${PC_ZIP_VERSION}")
if(ZIP_INCLUDE_DIRS AND ZIP_LIBRARIES)
set(ZIP_FOUND TRUE)
set(ZIP_LIBRARY ${ZIP_LIBRARIES})

View File

@ -6,11 +6,8 @@ option(BUILD_CDROID_TESTS "Build unit tests" ON)
option(ENABLE_GIF "enable gif encode and decoder" OFF)
option(ENABLE_CAIROSVG "enable svg decoder" OFF)
option(ENABLE_MBEDTLS "enable mbedtls" ON)
option(ENABLE_UPNP "enable upnp/dlna" OFF)
option(ENABLE_GESTURE "enable gestrure" OFF)
option(ENABLE_PLPLOT "Enable PLPLot" OFF)
option(ENABLE_DTV "DTV modules support" OFF)
option(WITH_JPEG8 "Emulate libjpeg v8 API/ABI (this makes ${CMAKE_PROJECT_NAME} backward-incompatible with libjpeg v6b)" ON)
option(FT_WITH_HARFBUZZ "Improve auto-hinting of OpenType fonts." ON)
option(ENABLE_PINYIN2HZ "Chinese Pinyin to HZ support" OFF)
@ -25,11 +22,6 @@ endif()
find_package(PNG REQUIRED)
find_package(JPEG REQUIRED)
if(ENABLE_TURBOJPEG)
find_package(TurboJPEG REQUIRED)
list(APPEND CDROID_DEPLIBS ${TURBOJPEG_LIBRARIES})
endif(ENABLE_TURBOJPEG)
find_package(ZLIB REQUIRED)
find_package(JSONCPP REQUIRED)
find_package(ZIP REQUIRED)
@ -43,28 +35,31 @@ find_package(Brotli REQUIRED)
find_package(BZip2 REQUIRED)
find_package(UniBreak REQUIRED)
list(APPEND CDROID_DEPLIBS
${PNG_LIBRARIES}
${JPEG_LIBRARIES}
${PIXMAN_LIBRARIES}
${FONTCONFIG_LIBRARIES}
${FREETYPE2_LIBRARIES}
${CAIRO_LIBRARIES}
${ZIP_LIBRARIES}
${UNIBREAK_LIBRARIES}
${EXPAT_LIBRARIES}
${JSONCPP_LIBRARIES}
${ZLIB_LIBRARIES}
${BROTLIDEC_LIBRARIES}
${BZIP2_LIBRARIES}
)
#string(REPLACE ";" " " CDROID_DEPLIBS ${CDROID_DEPLIBS})
if(ENABLE_FRIBIDI)
find_package(Fribidi REQUIRED)
list(APPEND CDROID_DEPLIBS ${FRIBIDI_LIBRARIES})
endif(ENABLE_FRIBIDI)
list(APPEND CDROID_DEPLIBS
${ZLIB_LIBRARIES}
${BROTLIDEC_LIBRARIES}
${BZIP2_LIBRARIES}
${PNG_LIBRARIES}
${JPEG_LIBRARIES}
${ZIP_LIBRARIES}
${UNIBREAK_LIBRARIES}
${EXPAT_LIBRARIES}
${PIXMAN_LIBRARIES}
#-Wl,--start-group
${FONTCONFIG_LIBRARIES}
${FREETYPE2_LIBRARIES}
${CAIRO_LIBRARIES}
# -Wl,--end-group
${JSONCPP_LIBRARIES}
)
if(ENABLE_TURBOJPEG)
find_package(TurboJPEG REQUIRED)
list(APPEND CDROID_DEPLIBS ${TURBOJPEG_LIBRARIES})
endif(ENABLE_TURBOJPEG)
list(APPEND CDROID_DEPINCLUDES
${PNG_INCLUDE_DIRS}
@ -79,7 +74,7 @@ list(APPEND CDROID_DEPINCLUDES
${FRIBIDI_INCLUDE_DIRS}
${TURBOJPEG_INCLUDE_DIRS}
)
#message("BROTLI_LIBRARIES
message("CDROID_DEPLIBS=${CDROID_DEPLIBS}")
if(OPENSSL_FOUND)
list(APPEND CDROID_DEPINCLUDES ${OPENSSL_INCLUDE_DIRS})
list(APPEND CDROID_DEPLIBS ${OPENSSL_LIBRARIES})

View File

@ -46,15 +46,9 @@ set(SOURCES_GUI ${SRCS_GUICORE} ${SRCS_VIEWS}
${SRCS_APP} ${SRCS_DIALOG}
${SRCS_ANIMATION} widget/R.h)
message("FONTCONFIG_LIBRARIES=${FONTCONFIG_LIBRARIES} CDROID_LIBS=${CDROID_LIBS}")
add_library(cdroid_objs OBJECT ${SOURCES_GUI})
add_library(cdroid_static STATIC $<TARGET_OBJECTS:cdroid_objs>)
add_library(cdroid SHARED $<TARGET_OBJECTS:cdroid_objs>)
add_library(cdroid SHARED ${SOURCES_GUI})
CreatePAK(cdroid ${PROJECT_SOURCE_DIR}/res ${PROJECT_BINARY_DIR}/cdroid.pak ${PROJECT_SOURCE_DIR}/widget/R.h)
set_target_properties(cdroid_static PROPERTIES OUTPUT_NAME "cdroid")
file(GLOB_RECURSE allfiles RELATIVE "${PROJECT_SOURCE_DIR}/" "*.h")
list(REMOVE_ITEM allfiles "private/*.h")
foreach( each_file ${allfiles} )
@ -67,13 +61,15 @@ foreach( each_file ${allfiles} )
install(FILES ${PROJECT_SOURCE_DIR}/${each_file} DESTINATION "${CMAKE_BINARY_DIR}/include/gui/${FILE_PATH}")
endforeach(each_file)
target_link_libraries(cdroid ${CDROID_DEPLIBS} tvhal )
ADD_WHOLE_ARCHIVE_TO_LIBRARIES(CDROID_DEPLIBS)
target_link_libraries(cdroid ${CDROID_DEPLIBS} tvhal)
configure_file(
"cdroid.pc.in"
"cdroid.pc"
@ONLY)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/cdroid.pc"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig")
configure_file(cdroid.pc.in cdroid.pc @ONLY)
install (TARGETS cdroid DESTINATION lib)
install (DIRECTORY ${PROJECT_SOURCE_DIR} DESTINATION include/ FILES_MATCHING PATTERN "*.h"

View File

@ -46,8 +46,8 @@ GraphDevice::GraphDevice(int fmt){
mPrimaryContext = new Canvas(surf);
mRectBanner.set(0,0,400,40);
mBannerContext = new Canvas(mRectBanner.width,mRectBanner.height);
mBannerSurface = mBannerContext->mHandle;
RefPtr<Surface>bannerSurf=ImageSurface::create(Surface::Format::ARGB32,400,40);
mBannerContext = new Canvas(bannerSurf);
mLastComposeTime = SystemClock::uptimeMillis();
@ -223,8 +223,8 @@ void GraphDevice::composeSurfaces(){
LOGD("%d:(%d,%d,%d,%d)",i,r.x,r.y,r.width,r.height);
}
mInvalidateRgn->do_xor(mInvalidateRgn);
if(mPrimarySurface&&mBannerSurface){
GFXBlit(mPrimarySurface,mScreenWidth-mRectBanner.width,mScreenHeight-mRectBanner.height,mBannerSurface,nullptr);
if(mPrimarySurface){
//GFXBlit(mPrimarySurface,mScreenWidth-mRectBanner.width,mScreenHeight-mRectBanner.height,mBannerSurface,nullptr);
}
GFXFlip(mPrimarySurface);
t2=SystemClock::uptimeMillis();

View File

@ -23,7 +23,6 @@ private:
std::mutex mMutex;
std::condition_variable mCV;
HANDLE mPrimarySurface;
HANDLE mBannerSurface;
class Canvas*mPrimaryContext;
Canvas *mBannerContext;
Cairo::RefPtr<Cairo::Region>mInvalidateRgn;

View File

@ -56,7 +56,9 @@ Window::Window(int x,int y,int width,int height,int type)
#endif
mContext=&App::getInstance();
mInLayout=false;
LOGV("%p Handler=%p visible=%d size=%dx%d",this,mUIEventHandler,hasFlag(VISIBLE),width,height);
if((width<1)||(height<1))
GFXGetScreenSize((UINT*)&width,(UINT*)&height);
printf("%p Handler=%p visible=%d size=%dx%d\r\n",this,mUIEventHandler,hasFlag(VISIBLE),width,height);
setFrame(x, y, width, height);
setDescendantFocusability(FOCUS_AFTER_DESCENDANTS);
setFocusable(true);

View File

@ -16,20 +16,16 @@ add_subdirectory(${CDROID_CHIPSET})
link_directories(${CMAKE_SOURCE_DIR}/deps/lib)
add_library(tvhal SHARED ${SRCS_COMMON} )
add_library(tvhal_static STATIC ${SRCS_COMMON} )
target_link_libraries(tvhal PUBLIC ${CDROID_CHIPSET})
target_link_libraries(tvhal_static PUBLIC ${CDROID_CHIPSET})
set_target_properties(tvhal_static PROPERTIES OUTPUT_NAME "tvhal")
target_link_libraries(tvhal PUBLIC ${CDROID_CHIPSET} PRIVATE)
file(GLOB HAL_HEADERS ${PROJECT_SOURCE_DIR}/include/*.h)
file(GLOB KEYCMAPS ${PROJECT_SOURCE_DIR}/${CDROID_CHIPSET}/*.kcm)
if( NOT(${CDROID_CHIPSET} MATCHES "x86") )
file(GLOB KEYMAP ${PROJECT_SOURCE_DIR}/${CDROID_CHIPSET}/*.kl)
file(GLOB KEYMAP ${PROJECT_SOURCE_DIR}/${CDROID_CHIPSET}/*.kl)
endif()
install (TARGETS tvhal DESTINATION lib)
install (TARGETS tvhal_static DESTINATION lib)
install (FILES ${HAL_HEADERS} DESTINATION include/porting/)
file(COPY ${HAL_HEADERS} common/shared_queue.h DESTINATION ${CMAKE_BINARY_DIR}/include/porting)

View File

@ -0,0 +1,34 @@
#ifndef __CDMEDIA_PLAYER_H__
#define __CDMEDIA_PLAYER_H__
#include <cdtypes.h>
BEGIN_DECLS
typedef enum{
MP_PREPARED,
MP_STARTED,
MP_PAUSED,
MP_SEEKED,
MP_BUFFERING,
MP_ERROR,
MP_END
}MPMESSAGE;
typedef void(*MP_CALLBACK)(HANDLE,MPMESSAGE msg,LONG param,void*userdata);
HANDLE MPOpen(const char*fname);
DWORD MPPlay(HANDLE handle);
DWORD MPStop(HANDLE handle);
DWORD MPClose(HANDLE handle);
DWORD MPResume(HANDLE handle);
DWORD MPPause(HANDLE handle);
DWORD MPGetDuration(HANDLE handle,double*mediatime);
DWORD MPGetPosition(HANDLE handle,double*position);
DWORD MPSeek(HANDLE handle,double seektime);
DWORD MPSetCallback(HANDLE,MP_CALLBACK,void*userdata);
DWORD MPSetVolume(HANDLE,int colume);
DWORD MPSetWindow(HANDLE,int x,int y,int width,int height);
END_DECLS
#endif

View File

@ -1,31 +0,0 @@
#ifndef __NGL_MEDIA_PLAYER_H__
#define __NGL_MEDIA_PLAYER_H__
#include <cdtypes.h>
BEGIN_DECLS
typedef enum{
MP_PREPARED,
MP_STARTED,
MP_PAUSED,
MP_SEEKED,
MP_BUFFERING,
MP_ERROR,
MP_END
}MPMESSAGE;
typedef void(*MP_CALLBACK)(HANDLE,MPMESSAGE msg,LONG param,void*userdata);
HANDLE nglMPOpen(const char*fname);
DWORD nglMPPlay(HANDLE handle);
DWORD nglMPStop(HANDLE handle);
DWORD nglMPClose(HANDLE handle);
DWORD nglMPResume(HANDLE handle);
DWORD nglMPPause(HANDLE handle);
DWORD nglMPGetTime(HANDLE handle,UINT*curtime,UINT*timems);
DWORD nglMPSeek(HANDLE handle,UINT timems);
DWORD nglMPSetCallback(HANDLE,MP_CALLBACK,void*userdata);
END_DECLS
#endif

View File

@ -1,13 +1,13 @@
project (x86 C CXX)
set(X86_SRCS
set(X64_SRCS
ngl_panel.c
ngl_mediaplayer.c
input_linux.cc
)
if (ENABLE_DTV)
list(APPEND X86_SRCS ngl_dsc.c ngl_smc.c ngl_tuner.c ngl_dmx.cc
list(APPEND X64_SRCS ngl_dsc.c ngl_smc.c ngl_tuner.c ngl_dmx.cc
ngl_nvm.c ngl_pvr.c ngl_snd.c ngl_video.c dmxreader.cc
ngl_disp.c ngl_os.c
)
@ -35,7 +35,7 @@ find_library(DRM_LIBRARY
)
if(DRM_LIBRARY AND DRM_INCLUDE_DIR)
list(APPEND X86LIBS ${DRM_LIBRARY})
list(APPEND X64LIBS ${DRM_LIBRARY})
endif()
if(HAVE_POLL_H)
@ -54,8 +54,8 @@ endif()
#sudo apt install libx11-dev
if( ENABLE_RFB )
add_definitions(-DENABLE_RFB=1)
list(APPEND X86_SRCS ../common/rfbcommon.cc)
list(APPEND X86LIBS vncserver)
list(APPEND X64_SRCS ../common/rfbcommon.cc)
list(APPEND X64LIBS vncserver)
find_package(ZLIB)
endif()
@ -66,28 +66,28 @@ if ( SYSNAME_LOWER MATCHES "linux" OR SYSNAME_LOWER MATCHES "cygwin" )
pkg_check_modules(GTK3 gtk+-3.0)
message("X11_INCLUDE_DIR=${X11_INCLUDE_DIR} ${X11_FOUND} ${GTK3_LIBRARIES} ${GTK3_FOUND} ${}")
if (FALSE AND DRM_LIBRARY)
list(APPEND X86_SRCS gfxdrm.cc graph_drm.cc)
list(APPEND X86LIBS ${DRM_LIBRARY})
list(APPEND X64_SRCS gfxdrm.cc graph_drm.cc)
list(APPEND X64LIBS ${DRM_LIBRARY})
elseif(FALSE)
list(APPEND X86_SRCS graph_fb.c)
list(APPEND X64_SRCS graph_fb.c)
elseif( X11_FOUND )
list(APPEND X86_SRCS graph_xlib.c)
list(APPEND X86LIBS ${X11_LIBRARIES})
list(APPEND X64_SRCS graph_xlib.c)
list(APPEND X64LIBS ${X11_LIBRARIES})
elseif( GTK3_FOUND )
list(APPEND X86_SRCS graph_gtk.c)
list(APPEND X86LIBS ${GTK3_LIBRARIES} ${DRM_LIBRARY})
list(APPEND X64_SRCS graph_gtk.c)
list(APPEND X64LIBS ${GTK3_LIBRARIES} ${DRM_LIBRARY})
else()
list(APPEND X86_SRCS graph_rfb.c)
list(APPEND X86LIBS vncserver)
list(APPEND X64_SRCS graph_rfb.c)
list(APPEND X64LIBS vncserver)
endif()
elseif (WIN32)
list(APPEND X86_SRCS graph_win32.c)
list(APPEND X86LIBS win32.lib)
list(APPEND X64_SRCS graph_win32.c)
list(APPEND X64LIBS win32.lib)
endif()
list(APPEND X86LIBS pthread)
list(APPEND X64LIBS pthread)
find_package(ZLIB)
message("ZLIB_INCLUDE=${ZLIB_INCLUDE_DIR} X86LIBS=${X86LIBS}")
message("ZLIB_INCLUDE=${ZLIB_INCLUDE_DIR} X64LIBS=${X64LIBS}" CMAKE_SOURCE_DIR=${CMAKE_SOURCE_DIR})
include_directories(./
../include
${DRM_INCLUDE_DIR}
@ -96,14 +96,9 @@ include_directories(./
${X11_INCLUDE_DIRS}
${GTK3_INCLUDE_DIRS}
${ZLIB_INCLUDE_DIR}
${CMAKE_BINARY_DIR}/include
${CMAKE_SOURCE_DIR}/src/3rdparty/libvncserver
${CMAKE_BINARY_DIR}/src/3rdparty/libvncserver
${CMAKE_SOURCE_DIR}/deps/include
${CMAKE_SOURCE_DIR}/deps/include/gui #for eventcodes.h
)
add_library(x86 STATIC ${X86_SRCS} )
target_link_libraries(x86 PRIVATE ${X86LIBS})
#message(FATAL_ERROR "PC_DRM=${DRM_INCLUDE_DIR}-${DRM_LIBRARY} X86LIBS=${X86LIBS}")
add_library(x64 STATIC ${X64_SRCS} )
target_link_libraries(x64 PRIVATE ${X64LIBS})
#message(FATAL_ERROR "PC_DRM=${DRM_INCLUDE_DIR}-${DRM_LIBRARY} X64LIBS=${X64LIBS}")

View File

@ -1,6 +1,6 @@
#include <cdtypes.h>
#include <ngl_mediaplayer.h>
#include <cdplayer.h>
#include <cdlog.h>
#include <ngl_os.h>
#include <stdlib.h>

View File

@ -19,7 +19,7 @@ include_directories(
link_directories(${DEPS_DIR}/lib)
add_executable(gui_test ${SRCS_GUI_TESTS})
target_link_libraries(gui_test PRIVATE ${CDROID_DEPLIBS} ${CDROID_LIBRARIES} ${GTEST_LIBRARIES} tvhal)
target_link_libraries(gui_test PRIVATE ${CDROID_DEPLIBS} ${GTEST_LIBRARIES} cdroid tvhal)
install(TARGETS gui_test DESTINATION bin/tests)

View File

@ -70,7 +70,8 @@ public :
size_t pt=path.rfind('.');
if(pt!= std::string::npos){
std::string ext=path.substr(pt+1);
if(filter.empty()||filter.compare(ext))images.push_back(path);
pt=path.find(filter);
if(filter.empty()||pt!= std::string::npos)images.push_back(path);
}
return ;
}
@ -109,6 +110,7 @@ TEST_F(IMAGE,Bitmap){
}
TEST_F(IMAGE,Image_PNG){
loadImages("./","png");
printf("%d image loaded\r\n",images.size());
for(int i=0;i<images.size();i++){
tmstart();
std::ifstream fs(images[i].c_str());
@ -118,7 +120,10 @@ TEST_F(IMAGE,Image_PNG){
ctx->rectangle(rect);
ctx->fill();
tmstart();
ctx->draw_image(img,rect,nullptr);
if(img){
ctx->draw_image(img,rect,nullptr);
}
printf("image %s =%p size=%dx%d\r\n",images[i].c_str(),img.get(),(img?img->get_width():0),(img?img->get_height():0));
tmend("drawimage");
postCompose();
}
@ -128,15 +133,17 @@ TEST_F(IMAGE,Image_PNG){
TEST_F(IMAGE,Image_JPG){
loadImages("./","jpg");
printf("%d img loaded\r\n",images.size());
for(int i=0;i<images.size();i++){
tmstart();
std::ifstream fs(images[i].c_str());
RefPtr<ImageSurface>imgj=ImageSurface::create_from_stream(fs);
RefPtr<ImageSurface>img=ImageSurface::create_from_stream(fs);
tmend("decodejpg");
RECT rect={0,0,800,600};
ctx->rectangle(rect);ctx->fill();
tmstart();
ctx->draw_image(imgj,rect,nullptr);
printf("image %s =%p\r\n",images[i].c_str(),img.get());
if(img)ctx->draw_image(img,rect,nullptr);
tmend("drawimage");
postCompose();
SLEEP(1000);

19
x64build.sh Executable file
View File

@ -0,0 +1,19 @@
if [ $# -gt 0 ]
then
mkdir -p outx64r
pushd outx64r
TYPE=Release
else
mkdir -p outx64
pushd outx64
TYPE=Debug
fi
export PKG_CONFIG_PATH=$HOME/vcpkg/installed/x64-linux-dynamic/lib/pkgconfig
export PKG_CONFIG_LIBDIR=$HOME/vcpkg/installed/x64-linux-dynamic/lib/pkgconfig
cmake -DCDROID_CHIPSET=x64 -DENABLE_RFB=OFF \
-DCMAKE_INSTALL_PREFIX=./ \
-DCMAKE_BUILD_TYPE=${TYPE} \
-DM_LIBRARY=m \
..
popd

View File

@ -1,27 +0,0 @@
if [ $# -gt 0 ]
then
mkdir -p out-x86r
pushd out-x86r
TYPE=Release
else
mkdir -p out-x86
pushd out-x86
TYPE=Debug
fi
cmake -DCDROID_CHIPSET=x86 -DENABLE_RFB=ON \
-DCMAKE_INSTALL_PREFIX=./ \
-DCMAKE_BUILD_TYPE=${TYPE} \
-DM_LIBRARY=m \
..
popd
if [ ! -d "src/gui" ]; then
pushd deps/lib
mv libcairo.a libcairo_static.a
mv libjrtp.a libjrtplib-static.a
mv libgui.a libgui_static.a
mv libdvbepg.a libdvbepg_static.a
mv libtvhal.a libtvhal_static.a
popd
fi