diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2023-07-24 21:01:51 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2023-07-24 21:23:32 (GMT) |
commit | ec155433ed3d719afb52752d63e868b1b23b96fc (patch) | |
tree | 221303a6e997aad8c885a7a40525255bb5c1b610 | |
parent | 6194193a8a0a476539590aabbb27094d1aff136a (diff) | |
download | CMake-ec155433ed3d719afb52752d63e868b1b23b96fc.zip CMake-ec155433ed3d719afb52752d63e868b1b23b96fc.tar.gz CMake-ec155433ed3d719afb52752d63e868b1b23b96fc.tar.bz2 |
FindFLTK: Replace exec_program() with execute_process()
-rw-r--r-- | Modules/FindFLTK.cmake | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/FindFLTK.cmake b/Modules/FindFLTK.cmake index d54d2f6..a245c6c 100644 --- a/Modules/FindFLTK.cmake +++ b/Modules/FindFLTK.cmake @@ -232,7 +232,7 @@ else() find_program(FLTK_CONFIG_SCRIPT fltk-config PATHS ${FLTK_BIN_DIR}) if(FLTK_CONFIG_SCRIPT) if(NOT FLTK_INCLUDE_DIR) - exec_program(${FLTK_CONFIG_SCRIPT} ARGS --cxxflags OUTPUT_VARIABLE FLTK_CXXFLAGS) + execute_process(COMMAND ${FLTK_CONFIG_SCRIPT} --cxxflags OUTPUT_VARIABLE FLTK_CXXFLAGS) if(FLTK_CXXFLAGS) string(REGEX MATCHALL "-I[^ ]*" _fltk_temp_dirs ${FLTK_CXXFLAGS}) string(REPLACE "-I" "" _fltk_temp_dirs "${_fltk_temp_dirs}") @@ -256,7 +256,7 @@ else() # Try to find FLTK library if(UNIX) if(FLTK_CONFIG_SCRIPT) - exec_program(${FLTK_CONFIG_SCRIPT} ARGS --libs OUTPUT_VARIABLE _FLTK_POSSIBLE_LIBS) + execute_process(COMMAND ${FLTK_CONFIG_SCRIPT} --libs OUTPUT_VARIABLE _FLTK_POSSIBLE_LIBS) if(_FLTK_POSSIBLE_LIBS) get_filename_component(_FLTK_POSSIBLE_LIBRARY_DIR ${_FLTK_POSSIBLE_LIBS} PATH) endif() @@ -292,12 +292,12 @@ else() # Find the extra libraries needed for the fltk_images library. if(UNIX) if(FLTK_CONFIG_SCRIPT) - exec_program(${FLTK_CONFIG_SCRIPT} ARGS --use-images --ldflags + execute_process(COMMAND ${FLTK_CONFIG_SCRIPT} --use-images --ldflags OUTPUT_VARIABLE FLTK_IMAGES_LDFLAGS) set(FLTK_LIBS_EXTRACT_REGEX ".*-lfltk_images (.*) -lfltk.*") if("${FLTK_IMAGES_LDFLAGS}" MATCHES "${FLTK_LIBS_EXTRACT_REGEX}") string(REGEX REPLACE " +" ";" FLTK_IMAGES_LIBS "${CMAKE_MATCH_1}") - # The EXEC_PROGRAM will not be inherited into subdirectories from + # The execute_process() will not be inherited into subdirectories from # the file that originally included this module. Save the answer. set(FLTK_IMAGES_LIBS "${FLTK_IMAGES_LIBS}" CACHE INTERNAL "Extra libraries for fltk_images library.") |