CMake: Use find_program to find a program.

Use find_program to find glib-compile-resources instead of find_file.

Change-Id: I565c3a596923ff4761bc38988ee396aa24bd63a6
Reviewed-on: https://code.wireshark.org/review/18714
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
This commit is contained in:
Gerald Combs 2016-11-08 11:44:31 -08:00
parent b688175834
commit 857b80e414
1 changed files with 3 additions and 3 deletions

View File

@ -272,8 +272,8 @@ if(WIN32)
set(PORTAUDIO_OBJ $<TARGET_OBJECTS:portaudio>)
endif()
find_file(GLIB_COMPILE_RESOURCES
glib-compile-resources${CMAKE_EXECUTABLE_SUFFIX}
find_program(GLIB_COMPILE_RESOURCES_EXECUTABLE
glib-compile-resources
HINTS
"${GLIB2_HINTS}/bin"
)
@ -283,7 +283,7 @@ pkg_check_modules(GRESOURCE QUIET gio-2.0>=2.32 gdk-pixbuf-2.0>=2.26)
macro(WIRESHARK_GRESOURCES _outputfile _resourcefile)
add_custom_command(
OUTPUT ${_outputfile}
COMMAND ${GLIB_COMPILE_RESOURCES} --sourcedir=${CMAKE_SOURCE_DIR} --target=${_outputfile} --generate --manual-register ${CMAKE_CURRENT_SOURCE_DIR}/${_resourcefile}
COMMAND ${GLIB_COMPILE_RESOURCES_EXECUTABLE} --sourcedir=${CMAKE_SOURCE_DIR} --target=${_outputfile} --generate --manual-register ${CMAKE_CURRENT_SOURCE_DIR}/${_resourcefile}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_resourcefile}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)