2020-03-06 06:17:08 +08:00
|
|
|
function(set_library_target NAMESPACE LIB_NAME DEBUG_LIB_FILE_NAME RELEASE_LIB_FILE_NAME INCLUDE_DIR)
|
|
|
|
add_library(${NAMESPACE}::${LIB_NAME} STATIC IMPORTED)
|
|
|
|
set_target_properties(${NAMESPACE}::${LIB_NAME} PROPERTIES
|
|
|
|
IMPORTED_CONFIGURATIONS "RELEASE;DEBUG"
|
|
|
|
IMPORTED_LOCATION_RELEASE "${RELEASE_LIB_FILE_NAME}"
|
|
|
|
IMPORTED_LOCATION_DEBUG "${DEBUG_LIB_FILE_NAME}"
|
|
|
|
INTERFACE_INCLUDE_DIRECTORIES "${INCLUDE_DIR}"
|
|
|
|
)
|
|
|
|
set(${NAMESPACE}_${LIB_NAME}_FOUND 1)
|
|
|
|
endfunction()
|
|
|
|
|
|
|
|
get_filename_component(ROOT "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
|
|
|
get_filename_component(ROOT "${ROOT}" PATH)
|
|
|
|
get_filename_component(ROOT "${ROOT}" PATH)
|
|
|
|
|
2021-03-27 02:39:45 +08:00
|
|
|
if (TRUE)
|
|
|
|
find_library(RYU_RELEASE_LIB ryu PATHS "${ROOT}/lib" NO_DEFAULT_PATH)
|
|
|
|
find_library(RYU_DEBUG_LIB ryu PATHS "${ROOT}/debug/lib" NO_DEFAULT_PATH)
|
|
|
|
find_library(RYUPF_RELEASE_LIB ryu_printf PATHS "${ROOT}/lib" NO_DEFAULT_PATH)
|
|
|
|
find_library(RYUPF_DEBUG_LIB ryu_printf PATHS "${ROOT}/debug/lib" NO_DEFAULT_PATH)
|
2021-04-30 06:45:22 +08:00
|
|
|
set_library_target("RYU" "ryu" "${RYU_DEBUG_LIB}" "${RYU_RELEASE_LIB}" "${ROOT}/include/")
|
|
|
|
set_library_target("RYU" "ryu_printf" "${RYUPF_DEBUG_LIB}" "${RYUPF_RELEASE_LIB}" "${ROOT}/include/")
|
2020-03-06 06:17:08 +08:00
|
|
|
else()
|
|
|
|
set_library_target("RYU" "ryu" "${ROOT}/debug/lib/libryu.a" "${ROOT}/lib/libryu.a" "${ROOT}/include/")
|
2021-02-19 04:58:41 +08:00
|
|
|
set_library_target("RYU" "ryu_printf" "${ROOT}/debug/lib/libryu_printf.a" "${ROOT}/lib/libryu_printf.a" "${ROOT}/include/")
|
2021-03-27 02:39:45 +08:00
|
|
|
endif()
|