Mentions légales du service

Skip to content
Snippets Groups Projects

fix silent warnings and pkgconfig

Merged BOUCHERIE Raphael requested to merge hotfix into master
5 files
+ 29
67
Compare changes
  • Side-by-side
  • Inline
Files
5
@@ -33,18 +33,18 @@
@@ -33,18 +33,18 @@
# used in CLEAN_LIB_LIST
# used in CLEAN_LIB_LIST
#
#
###
###
MACRO(CONVERT_LIBSTYLE_TO_PKGCONFIG _liblist)
macro(CONVERT_LIBSTYLE_TO_PKGCONFIG _liblist)
set(${_liblist}_CPY "${${_liblist}}")
set(${_liblist}_CPY "${${_liblist}}")
set(${_liblist} "")
set(${_liblist} "")
foreach(_dep ${${_liblist}_CPY})
foreach(_dep ${${_liblist}_CPY})
if (${_dep} MATCHES "^/")
if (${_dep} MATCHES "^/")
get_filename_component(dep_libname ${_dep} NAME)
get_filename_component(dep_libname ${_dep} NAME)
get_filename_component(dep_libdir ${_dep} DIRECTORY)
get_filename_component(dep_libdir ${_dep} DIRECTORY)
STRING(REPLACE "lib" "" dep_libname "${dep_libname}")
string(REPLACE "lib" "" dep_libname "${dep_libname}")
STRING(REPLACE ".so" "" dep_libname "${dep_libname}")
string(REPLACE ".so" "" dep_libname "${dep_libname}")
STRING(REPLACE ".a" "" dep_libname "${dep_libname}")
string(REPLACE ".a" "" dep_libname "${dep_libname}")
STRING(REPLACE ".dylib" "" dep_libname "${dep_libname}")
string(REPLACE ".dylib" "" dep_libname "${dep_libname}")
STRING(REPLACE ".dll" "" dep_libname "${dep_libname}")
string(REPLACE ".dll" "" dep_libname "${dep_libname}")
list(APPEND ${_liblist} -L${dep_libdir} -l${dep_libname})
list(APPEND ${_liblist} -L${dep_libdir} -l${dep_libname})
elseif(NOT ${_dep} MATCHES "^-")
elseif(NOT ${_dep} MATCHES "^-")
list(APPEND ${_liblist} "-l${_dep}")
list(APPEND ${_liblist} "-l${_dep}")
@@ -52,7 +52,7 @@ MACRO(CONVERT_LIBSTYLE_TO_PKGCONFIG _liblist)
@@ -52,7 +52,7 @@ MACRO(CONVERT_LIBSTYLE_TO_PKGCONFIG _liblist)
list(APPEND ${_liblist} ${_dep})
list(APPEND ${_liblist} ${_dep})
endif()
endif()
endforeach()
endforeach()
ENDMACRO(CONVERT_LIBSTYLE_TO_PKGCONFIG)
endmacro(CONVERT_LIBSTYLE_TO_PKGCONFIG)
###
###
#
#
@@ -60,44 +60,44 @@ ENDMACRO(CONVERT_LIBSTYLE_TO_PKGCONFIG)
@@ -60,44 +60,44 @@ ENDMACRO(CONVERT_LIBSTYLE_TO_PKGCONFIG)
# used in GENERATE_PKGCONFIG_FILE
# used in GENERATE_PKGCONFIG_FILE
#
#
###
###
MACRO(CLEAN_LIB_LIST _package)
macro(CLEAN_LIB_LIST _package)
list(REMOVE_DUPLICATES ${_package}_PKGCONFIG_LIBS)
list(REMOVE_DUPLICATES ${_package}_PKGCONFIG_LIBS)
list(REMOVE_DUPLICATES ${_package}_PKGCONFIG_LIBS_PRIVATE)
list(REMOVE_DUPLICATES ${_package}_PKGCONFIG_LIBS_PRIVATE)
list(REMOVE_DUPLICATES ${_package}_PKGCONFIG_REQUIRED)
list(REMOVE_DUPLICATES ${_package}_PKGCONFIG_REQUIRED)
list(REMOVE_DUPLICATES ${_package}_PKGCONFIG_REQUIRED_PRIVATE)
list(REMOVE_DUPLICATES ${_package}_PKGCONFIG_REQUIRED_PRIVATE)
CONVERT_LIBSTYLE_TO_PKGCONFIG(${_package}_PKGCONFIG_LIBS)
convert_libstyle_to_pkgconfig(${_package}_PKGCONFIG_LIBS)
CONVERT_LIBSTYLE_TO_PKGCONFIG(${_package}_PKGCONFIG_LIBS_PRIVATE)
convert_libstyle_to_pkgconfig(${_package}_PKGCONFIG_LIBS_PRIVATE)
STRING(REPLACE ";" " " ${_package}_PKGCONFIG_LIBS "${${_package}_PKGCONFIG_LIBS}")
string(REPLACE ";" " " ${_package}_PKGCONFIG_LIBS "${${_package}_PKGCONFIG_LIBS}")
STRING(REPLACE ";" " " ${_package}_PKGCONFIG_LIBS_PRIVATE "${${_package}_PKGCONFIG_LIBS_PRIVATE}")
string(REPLACE ";" " " ${_package}_PKGCONFIG_LIBS_PRIVATE "${${_package}_PKGCONFIG_LIBS_PRIVATE}")
STRING(REPLACE ";" " " ${_package}_PKGCONFIG_REQUIRED "${${_package}_PKGCONFIG_REQUIRED}")
string(REPLACE ";" " " ${_package}_PKGCONFIG_REQUIRED "${${_package}_PKGCONFIG_REQUIRED}")
STRING(REPLACE ";" " " ${_package}_PKGCONFIG_REQUIRED_PRIVATE "${${_package}_PKGCONFIG_REQUIRED_PRIVATE}")
string(REPLACE ";" " " ${_package}_PKGCONFIG_REQUIRED_PRIVATE "${${_package}_PKGCONFIG_REQUIRED_PRIVATE}")
ENDMACRO(CLEAN_LIB_LIST)
endmacro(CLEAN_LIB_LIST)
###
###
#
#
# GENERATE_PKGCONFIG_FILE: generate files libhqr.pc
# GENERATE_PKGCONFIG_FILE: generate files libhqr.pc
#
#
###
###
MACRO(GENERATE_HQR_PKGCONFIG_FILE)
macro(GENERATE_HQR_PKGCONFIG_FILE)
SET(HQR_PKGCONFIG_LIBS "-lhqr")
set(HQR_PKGCONFIG_LIBS "-lhqr")
SET(HQR_PKGCONFIG_LIBS_PRIVATE "-lm")
set(HQR_PKGCONFIG_LIBS_PRIVATE "-lm")
SET(HQR_PKGCONFIG_REQUIRED "")
set(HQR_PKGCONFIG_REQUIRED "")
SET(HQR_PKGCONFIG_REQUIRED_PRIVATE "")
set(HQR_PKGCONFIG_REQUIRED_PRIVATE "")
CLEAN_LIB_LIST(LIBHQR)
clean_lib_list(LIBHQR)
SET(_output_libhqr_file "${CMAKE_BINARY_DIR}/hqr.pc")
set(_output_libhqr_file "${CMAKE_BINARY_DIR}/hqr.pc")
CONFIGURE_FILE(
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/lib/pkgconfig/hqr.pc.in"
"${CMAKE_CURRENT_SOURCE_DIR}/lib/pkgconfig/hqr.pc.in"
"${_output_hqr_file}"
"${_output_hqr_file}"
@ONLY
@ONLY
)
)
INSTALL(
install(
FILES ${_output_hqr_file}
FILES ${_output_hqr_file}
DESTINATION lib/pkgconfig
DESTINATION lib/pkgconfig
)
)
ENDMACRO(GENERATE_PKGCONFIG_FILE)
endmacro(GENERATE_HQR_PKGCONFIG_FILE)
##
##
## @end file GenPkgConfig.cmake
## @end file GenPkgConfig.cmake
Loading