Permalink
Browse files

Fix xxdi.pl script for sub projects

  • Loading branch information...
milot-mirdita committed Sep 7, 2018
1 parent 67d9de3 commit 879703227b3fbb8afc4b4cde473b1bb88e8aee72
Showing with 3 additions and 2 deletions.
  1. +3 −2 cmake/MMseqsResourceCompiler.cmake
@@ -1,11 +1,13 @@
set(compile_resource__internal_dir ${CMAKE_CURRENT_LIST_DIR} CACHE INTERNAL "")
find_program(XXD_EXECUTABLE xxd)
if(NOT XXD_EXECUTABLE)
find_program(PERL_EXECUTABLE perl)
if(NOT PERL_EXECUTABLE)
message(FATAL_ERROR "Neither xxd nor perl found in PATH. xxd is usually contained in your distributions vim-common package!")
else()
message("-- xxd not found, using xxdi.pl instead")
set(XXD_EXECUTABLE "${CMAKE_MODULE_PATH}/xxdi.pl")
set(XXD_EXECUTABLE "${compile_resource__internal_dir}/xxdi.pl")
set(XXD_PARAMS "")
endif()
else()
@@ -30,7 +32,6 @@ else()
set(SHELLCHECK_EXECUTABLE true)
endif()
set(compile_resource__internal_dir ${CMAKE_CURRENT_LIST_DIR} CACHE INTERNAL "")
function(compile_resource INPUT_FILE OUTPUT_FILE)
get_filename_component(INPUT_FILE_NAME ${PROJECT_SOURCE_DIR}/data/${INPUT_FILE} NAME)
set(OUTPUT_FILE ${PROJECT_BINARY_DIR}/generated/${INPUT_FILE_NAME}.h PARENT_SCOPE)

0 comments on commit 8797032

Please sign in to comment.