1 include(FindPackageHandleStandardArgs)
3 # Simple path search with YASM_ROOT environment variable override
4 find_program(YASM_EXECUTABLE
5 NAMES yasm yasm-1.2.0-win32 yasm-1.2.0-win64
6 HINTS $ENV{YASM_ROOT} ${YASM_ROOT}
11 execute_process(COMMAND ${YASM_EXECUTABLE} --version
12 OUTPUT_VARIABLE yasm_version
14 OUTPUT_STRIP_TRAILING_WHITESPACE
16 if(yasm_version MATCHES "^yasm ([0-9\\.]*)")
17 set(YASM_VERSION_STRING "${CMAKE_MATCH_1}")
22 # Provide standardized success/failure messages
23 find_package_handle_standard_args(yasm
24 REQUIRED_VARS YASM_EXECUTABLE
25 VERSION_VAR YASM_VERSION_STRING)