Cdroid/apps/uidemo1/CMakeLists.txt

40 lines
1.2 KiB
CMake
Raw Normal View History

2021-12-17 16:59:10 +08:00
cmake_minimum_required (VERSION 3.8)
2022-07-06 15:58:40 +08:00
project(uidemo1 C CXX)
2021-06-24 10:12:55 +08:00
set(CMAKE_CXX_STANDARD 11)
#find_package(CDROID REQUIRED)
2021-06-24 10:12:55 +08:00
include_directories(
./
2022-11-29 19:02:11 +08:00
${CDROID_INCLUDE_DIRS}
${CDROID_DEPINCLUDES}
${CMAKE_BINARY_DIR}/include
${CMAKE_BINARY_DIR}/include/gui
${CMAKE_BINARY_DIR}/include/porting
${CMAKE_BINARY_DIR}/include/cairo
${CMAKE_BINARY_DIR}/include/epg
${CMAKE_BINARY_DIR}/include/freetype2
2022-12-11 16:47:04 +08:00
2021-06-24 10:12:55 +08:00
)
aux_source_directory(./ DEMO_SRCS)
2022-11-07 07:49:41 +08:00
add_definitions(--include cdtypes.h)
add_definitions(--include cdlog.h)
link_directories(${CMAKE_BINARY_DIR}/lib)
2022-07-06 15:58:40 +08:00
add_executable(uidemo1 ${DEMO_SRCS})
2021-06-24 10:12:55 +08:00
2022-07-06 15:58:40 +08:00
CreatePO(${PROJECT_SOURCE_DIR} ${PROJECT_BINARY_DIR} uidemo1)
2022-01-23 20:32:53 +08:00
2022-07-06 15:58:40 +08:00
CreatePAK(uidemo1 ${PROJECT_SOURCE_DIR}/assets ${PROJECT_BINARY_DIR}/uidemo1.pak ${PROJECT_SOURCE_DIR}/R.h)
2021-06-24 10:12:55 +08:00
2022-07-06 15:58:40 +08:00
add_custom_target(uidemo1translate
2021-06-24 10:12:55 +08:00
COMMAND python ${CMAKE_SOURCE_DIR}/src/tools/po2json.py ${CMAKE_CURRENT_BINARY_DIR}/uidemo.po
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
COMMENT "Translate strings resource..."
)
2022-11-30 20:47:47 +08:00
message("CDROID_LIBRARIES=${CDROID_LIBRARIES} CDROID_INCLUDE_DIRS=${CDROID_INCLUDE_DIRS}")
2022-12-11 16:47:04 +08:00
target_link_libraries(uidemo1 PRIVATE cdroid)
2021-06-24 10:12:55 +08:00
2022-07-06 15:58:40 +08:00
install(TARGETS uidemo1 DESTINATION bin)
2021-06-24 10:12:55 +08:00