mirror of
https://gitee.com/houstudio/Cdroid.git
synced 2024-12-01 19:58:14 +08:00
fix idgen CreatePAK
This commit is contained in:
parent
e9680daf7a
commit
10eb4deae4
@ -49,7 +49,7 @@ int FileAdapter::loadFiles(const std::string&filepath){
|
||||
}
|
||||
}
|
||||
if(dir)closedir(dir);
|
||||
LOGD("%s scaned=%d",filepath.c_str(),count);
|
||||
LOGV("%s scaned=%d",filepath.c_str(),count);
|
||||
return count;
|
||||
}
|
||||
|
||||
|
@ -1,10 +1,9 @@
|
||||
|
||||
function(CreatePAK project ResourceDIR PakPath rhpath)
|
||||
add_custom_target(${project}_Resource
|
||||
COMMAND python ${CMAKE_SOURCE_DIR}/scripts/idgen.py ${ResourceDIR} ${rhpath}
|
||||
add_custom_command(OUTPUT ${rhpath}
|
||||
COMMAND ${CMAKE_SOURCE_DIR}/scripts/idgen.py ${ResourceDIR} ${rhpath}
|
||||
COMMAND zip -u -r -0 ${PakPath} ./
|
||||
WORKING_DIRECTORY ${ResourceDIR})
|
||||
add_dependencies(${project} ${project}_Resource)
|
||||
message("Package ${ResourceDIR} to:${PakPath}")
|
||||
install(FILES ${PakPath} DESTINATION data)
|
||||
endfunction()
|
||||
|
@ -1,5 +0,0 @@
|
||||
set(CDROID_INCLUDE_DIR ${CMAKE_BINARY_DIR}/include/gui)
|
||||
set(CDROID_INCLUDE_DIR$ ${CDROID_INCLUDE_DIR})
|
||||
set(CDROID_LIBRARY gui)
|
||||
set(CDROID_LIBRARIES ${CDROID_LIBRARY})
|
||||
set(CDROID_FOUND TRUE)
|
11
cmake/modules/FindCDroid.cmake
Executable file
11
cmake/modules/FindCDroid.cmake
Executable file
@ -0,0 +1,11 @@
|
||||
if (EXISTS "${CMAKE_SOURCE_DIR}/src/gui/widget/view.h" )
|
||||
set(CDROID_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/src/gui)
|
||||
else()
|
||||
set(CDROID_INCLUDE_DIR ${CMAKE_BINARY_DIR}/include)
|
||||
endif()
|
||||
#message(FATAL_ERROR "CDROID_INCLUDE_DIR=${CDROID_INCLUDE_DIR}")
|
||||
set(CDROID_INCLUDE_DIRS ${CDROID_INCLUDE_DIR})
|
||||
set(CDROID_LIBRARY gui)
|
||||
set(CDROID_LIBRARIES ${CDROID_LIBRARY})
|
||||
set(CDROID_INCLUDE_DIRS ${CDROID_INCLUDE_DIR})
|
||||
set(CDROID_FOUND TRUE)
|
@ -116,5 +116,5 @@ if ( __name__ == "__main__"):
|
||||
idgen.dict2RH(sys.argv[2],namespace)
|
||||
idgen.dict2ID(sys.argv[1]+"/values/ID.xml")
|
||||
else:
|
||||
print sys.argv[2]+"is not outofdate ,skipped."
|
||||
print sys.argv[2]+" is latest ,skipped."
|
||||
|
||||
|
@ -41,23 +41,17 @@ include_directories(
|
||||
|
||||
add_definitions(-DRAPIDJSON_HAS_STDSTRING)
|
||||
|
||||
CreatePAK(gui ${PROJECT_SOURCE_DIR}/res ${PROJECT_BINARY_DIR}/cdroid.pak ${PROJECT_SOURCE_DIR}/widget/R.h)
|
||||
|
||||
set(SOURCES_GUI ${SRCS_GUICORE} ${SRCS_VIEWS}
|
||||
${SRCS_WIDGET} ${SRCS_DRAWABLES}
|
||||
${SRCS_CAIROMM} ${SRCS_DIALOG}
|
||||
${SRCS_ANIMATION})
|
||||
${SRCS_ANIMATION} widget/R.h)
|
||||
|
||||
add_library(gui_objs OBJECT ${SOURCES_GUI})
|
||||
add_library(gui_static STATIC $<TARGET_OBJECTS:gui_objs>)
|
||||
add_library(gui SHARED $<TARGET_OBJECTS:gui_objs>)
|
||||
|
||||
add_custom_target(systempak
|
||||
COMMAND zip -r -0 ${CMAKE_CURRENT_BINARY_DIR}/system.pak *
|
||||
BYPRODUCTS gui gui_static
|
||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/res
|
||||
COMMENT "package system resource"
|
||||
)
|
||||
|
||||
CreatePAK(gui ${PROJECT_SOURCE_DIR}/res ${PROJECT_BINARY_DIR}/cdroid.pak ${PROJECT_SOURCE_DIR}/widget/R.h)
|
||||
set_target_properties(gui_static PROPERTIES OUTPUT_NAME "gui")
|
||||
|
||||
file(GLOB_RECURSE allfiles RELATIVE "${PROJECT_SOURCE_DIR}/" "*.h")
|
||||
|
0
src/gui/widget/R.h
Executable file → Normal file
0
src/gui/widget/R.h
Executable file → Normal file
Loading…
Reference in New Issue
Block a user