diff options
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/FindJsonSchemaBuilder.cmake | 6 | ||||
-rw-r--r-- | cmake/modules/FindTexturePacker.cmake | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/cmake/modules/FindJsonSchemaBuilder.cmake b/cmake/modules/FindJsonSchemaBuilder.cmake index 1e9afdfba6..06957c6a07 100644 --- a/cmake/modules/FindJsonSchemaBuilder.cmake +++ b/cmake/modules/FindJsonSchemaBuilder.cmake @@ -31,11 +31,13 @@ if(NOT TARGET JsonSchemaBuilder::JsonSchemaBuilder) else() if(WITH_JSONSCHEMABUILDER) get_filename_component(_jsbpath ${WITH_JSONSCHEMABUILDER} ABSOLUTE) + get_filename_component(_jsbpath ${_jsbpath} DIRECTORY) find_program(JSONSCHEMABUILDER_EXECUTABLE NAMES "${APP_NAME_LC}-JsonSchemaBuilder" JsonSchemaBuilder - PATHS ${_jsbpath}) + HINTS ${_jsbpath}) include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(JsonSchemaBuilder DEFAULT_MSG JSONSCHEMABUILDER_EXECUTABLE) + find_package_handle_standard_args(JsonSchemaBuilder "Could not find '${APP_NAME_LC}-JsonSchemaBuilder' or 'JsonSchemaBuilder' executable in ${_jsbpath} supplied by -DWITH_JSONSCHEMABUILDER. Make sure the executable file name matches these names!" + JSONSCHEMABUILDER_EXECUTABLE) if(JSONSCHEMABUILDER_FOUND) add_executable(JsonSchemaBuilder::JsonSchemaBuilder IMPORTED GLOBAL) set_target_properties(JsonSchemaBuilder::JsonSchemaBuilder PROPERTIES diff --git a/cmake/modules/FindTexturePacker.cmake b/cmake/modules/FindTexturePacker.cmake index 20d2ef7ea0..5284d72887 100644 --- a/cmake/modules/FindTexturePacker.cmake +++ b/cmake/modules/FindTexturePacker.cmake @@ -31,11 +31,13 @@ if(NOT TARGET TexturePacker::TexturePacker) else() if(WITH_TEXTUREPACKER) get_filename_component(_tppath ${WITH_TEXTUREPACKER} ABSOLUTE) + get_filename_component(_tppath ${_tppath} DIRECTORY) find_program(TEXTUREPACKER_EXECUTABLE NAMES "${APP_NAME_LC}-TexturePacker" TexturePacker - PATHS ${_tppath}) + HINTS ${_tppath}) include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(TexturePacker DEFAULT_MSG TEXTUREPACKER_EXECUTABLE) + find_package_handle_standard_args(TexturePacker "Could not find '${APP_NAME_LC}-TexturePacker' or 'TexturePacker' executable in ${_tppath} supplied by -DWITH_TEXTUREPACKER. Make sure the executable file name matches these names!" + TEXTUREPACKER_EXECUTABLE) if(TEXTUREPACKER_FOUND) add_executable(TexturePacker::TexturePacker IMPORTED GLOBAL) set_target_properties(TexturePacker::TexturePacker PROPERTIES |