mirror of
https://gitlab.freedesktop.org/uchardet/uchardet.git
synced 2025-12-08 01:36:41 +08:00
This was badly named as this function does not return candidates, but the number of candidates (to be actually used in other API).
42 lines
1.1 KiB
CMake
42 lines
1.1 KiB
CMake
set(
|
|
UCHARDET_SYMBOLS
|
|
uchardet_new
|
|
uchardet_delete
|
|
uchardet_handle_data
|
|
uchardet_data_end
|
|
uchardet_reset
|
|
uchardet_get_charset
|
|
uchardet_get_n_candidates
|
|
uchardet_get_encoding
|
|
uchardet_get_confidence
|
|
uchardet_get_language
|
|
uchardet_set_default_weight
|
|
uchardet_weigh_language
|
|
)
|
|
|
|
set (LINK_FLAGS "")
|
|
|
|
if (APPLE)
|
|
# Create a symbols_list file for the Darwin linker.
|
|
string(REPLACE ";" "\n_" _symbols "${UCHARDET_SYMBOLS}")
|
|
set(_symbols_list "${CMAKE_CURRENT_BINARY_DIR}/symbols.list")
|
|
file(WRITE ${_symbols_list} "_${_symbols}\n")
|
|
|
|
set(LINK_FLAGS
|
|
"${LINK_FLAGS} -Wl,-exported_symbols_list,'${_symbols_list}'")
|
|
elseif (CMAKE_CXX_COMPILER_ID STREQUAL GNU)
|
|
# Create a version script for the GNU ld.
|
|
set(_symbols "{ global: ${UCHARDET_SYMBOLS}; local: *; };")
|
|
set(_version_script "${CMAKE_CURRENT_BINARY_DIR}/version.script")
|
|
file(WRITE ${_version_script} "${_symbols}\n")
|
|
|
|
set(LINK_FLAGS "${LINK_FLAGS} -Wl,--version-script,\"${_version_script}\"")
|
|
endif (APPLE)
|
|
|
|
set_target_properties(
|
|
${UCHARDET_LIBRARY}
|
|
PROPERTIES
|
|
LINK_FLAGS
|
|
"${LINK_FLAGS}"
|
|
)
|