Created
October 29, 2020 18:22
-
-
Save qis/2f9633d1845b3978a591f800059a6f9f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
file(MAKE_DIRECTORY | |
${CMAKE_CURRENT_BINARY_DIR}/data | |
${CMAKE_CURRENT_BINARY_DIR}/temp) | |
add_executable(icupkg src/source/tools/icupkg/icupkg.cpp) | |
target_compile_options(icupkg PRIVATE ${compile_options}) | |
target_compile_definitions(icupkg PRIVATE ${compile_definitions}) | |
target_link_libraries(icupkg PRIVATE dt_stub uc in io tu) | |
add_custom_target(data ALL DEPENDS icupkg COMMAND $<TARGET_FILE:icupkg> | |
-d data --list | |
-x "*" ${CMAKE_CURRENT_SOURCE_DIR}/src/source/data/in/icudt${PROJECT_VERSION_MAJOR}l.dat | |
-o data/icudata.lst | |
SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/source/data/in/icudt${PROJECT_VERSION_MAJOR}l.dat | |
BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/data/icudata.lst | |
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) | |
add_executable(pkgdata src/source/tools/pkgdata/pkgdata.cpp src/source/tools/pkgdata/pkgtypes.c) | |
target_compile_options(pkgdata PRIVATE ${compile_options}) | |
target_compile_definitions(pkgdata PRIVATE ${compile_definitions}) | |
target_include_directories(pkgdata PRIVATE source/tools/pkgdata) | |
target_link_libraries(pkgdata PRIVATE dt_stub uc in io tu) | |
add_custom_target(dt ALL DEPENDS data pkgdata COMMAND $<TARGET_FILE:pkgdata> | |
-q # quiet (q) or verbose (v) | |
-c # copiright | |
-s data # source directory | |
-d data # destination directory | |
-r ${PROJECT_VERSION_MAJOR} # revision | |
-e icudt${PROJECT_VERSION_MAJOR} # entry point and export library name | |
-p icudt${PROJECT_VERSION_MAJOR}l # data name | |
-T temp # temporary directory | |
-m dll # mode | |
-L $<TARGET_LINKER_FILE_BASE_NAME:dt_stub> # import library name | |
data/icudata.lst | |
SOURCES ${CMAKE_CURRENT_BINARY_DIR}/data/icudata.lst | |
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) | |
install(FILES | |
${CMAKE_CURRENT_BINARY_DIR}/data/$<TARGET_LINKER_FILE_BASE_NAME:dt_stub>.dll | |
DESTINATION ${CMAKE_INSTALL_BINDIR}) | |
install(FILES | |
${CMAKE_CURRENT_BINARY_DIR}/data/$<TARGET_LINKER_FILE_BASE_NAME:dt_stub>.lib | |
DESTINATION ${CMAKE_INSTALL_LIBDIR}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment