mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-18 11:38:08 +00:00
Fix libintl search on Linux when building with CMake.
This commit is contained in:
parent
d490d30787
commit
a0d870c7bc
2 changed files with 15 additions and 11 deletions
|
|
@ -41,16 +41,17 @@ if(INTL_INCLUDE_DIRS)
|
|||
set(HAVE_LIBINTL_H 1)
|
||||
endif()
|
||||
|
||||
find_library(INTL_LIBRARIES
|
||||
NAMES intl
|
||||
HINTS ${_INTL_ROOT_PATHS}
|
||||
PATH_SUFFIXES bin lib
|
||||
)
|
||||
set(INTL_ARGS INTL_INCLUDE_DIRS HAVE_LIBINTL_H)
|
||||
if(NOT UNIX OR APPLE)
|
||||
find_library(INTL_LIBRARIES
|
||||
NAMES intl
|
||||
HINTS ${_INTL_ROOT_PATHS}
|
||||
PATH_SUFFIXES bin lib
|
||||
)
|
||||
list(APPEND INTL_ARGS INTL_LIBRARIES)
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Intl
|
||||
DEFAULT_MSG
|
||||
INTL_INCLUDE_DIRS INTL_LIBRARIES HAVE_LIBINTL_H
|
||||
)
|
||||
find_package_handle_standard_args(Intl DEFAULT_MSG ${INTL_ARGS})
|
||||
|
||||
mark_as_advanced(INTL_INCLUDE_DIRS INTL_LIBRARIES HAVE_LIBINTL_H)
|
||||
mark_as_advanced(${INTL_ARGS})
|
||||
|
|
|
|||
|
|
@ -85,7 +85,10 @@ else()
|
|||
endif()
|
||||
set_target_properties(linphone-gtk PROPERTIES OUTPUT_NAME linphone)
|
||||
target_include_directories(linphone-gtk PUBLIC ${GTK2_INCLUDE_DIRS} ${INTL_INCLUDE_DIRS})
|
||||
target_link_libraries(linphone-gtk linphone ${GTK2_LIBRARIES} ${INTL_LIBRARIES})
|
||||
target_link_libraries(linphone-gtk linphone ${GTK2_LIBRARIES})
|
||||
if(INTL_LIBRARIES)
|
||||
target_link_libraries(linphone-gtk ${INTL_LIBRARIES})
|
||||
endif()
|
||||
if(WIN32)
|
||||
target_link_libraries(linphone-gtk Wininet)
|
||||
endif()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue