Commit a0d870c7 authored by Ghislain MARY's avatar Ghislain MARY

Fix libintl search on Linux when building with CMake.

parent d490d307
......@@ -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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment