1# Minimum CMake required 2cmake_minimum_required(VERSION 3.1.3) 3 4# Project 5project(libandroidicu C CXX) 6 7set(ICU_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include") 8set(ICU_SHIM_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/static_shim") 9 10# Glob icu source files 11file( 12 GLOB_RECURSE 13 ICU_CC_SOURCES 14 "${ICU_SOURCE_DIR}/*.cpp" 15 "${ICU_SOURCE_DIR}/*.h" 16) 17message(STATUS "ICU_CC_SOURCES=${ICU_CC_SOURCES}") 18 19file( 20 GLOB_RECURSE 21 ICU_CC_SHIM_SOURCES 22 "${ICU_SHIM_SOURCE_DIR}/*.cpp" 23 "${ICU_SHIM_SOURCE_DIR}/*.h" 24) 25message(STATUS "ICU_CC_SHIM_SOURCES=${ICU_CC_SHIM_SOURCES}") 26 27add_library( 28 # name 29 libandroidicu 30 31 # SHARED or STATIC 32 STATIC 33 34 # Provides a relative path to your source file(s). 35 ${ICU_CC_SOURCES} 36 ${ICU_CC_SHIM_SOURCES} 37) 38target_include_directories(libandroidicu PRIVATE ${ICU_SOURCE_DIR}) 39target_include_directories(libandroidicu PRIVATE ${ICU_SHIM_SOURCE_DIR}) 40 41set_target_properties(libandroidicu PROPERTIES LINKER_LANGUAGE CXX) 42