Skip to content

Commit

Permalink
Merge pull request #717 from elucideye/pr.android.windows
Browse files Browse the repository at this point in the history
Android Studio, Windows host
  • Loading branch information
ruslo authored Aug 15, 2018
2 parents 3de4257 + b4f1ae5 commit 8786b23
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
6 changes: 5 additions & 1 deletion src/examples/cmake/HunterGate.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,11 @@ function(hunter_gate_download dir)
)

if(NOT download_result EQUAL 0)
hunter_gate_internal_error("Configure project failed")
hunter_gate_internal_error(
"Configure project failed."
"To reproduce the error run: ${CMAKE_COMMAND} -H${dir} -B${build_dir} -G${CMAKE_GENERATOR} ${toolchain_arg} ${make_arg}"
"In directory ${dir}"
)
endif()

hunter_gate_status_print(
Expand Down
1 change: 1 addition & 0 deletions src/examples/cmake/include/init.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ set(top_dir "${CMAKE_CURRENT_LIST_DIR}/../..")

if(FACEFILTER_ANDROID_STUDIO)
set(gen_toolchain "${CMAKE_CURRENT_BINARY_DIR}/generated/toolchain.cmake")
file(TO_CMAKE_PATH "${CMAKE_TOOLCHAIN_FILE}" CMAKE_TOOLCHAIN_FILE_CMAKE_PATH)
configure_file(
"${top_dir}/cmake/template/toolchain.cmake.in"
"${gen_toolchain}"
Expand Down
12 changes: 6 additions & 6 deletions src/examples/cmake/template/toolchain.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,18 @@ set(CMAKE_SYSTEM_VERSION "@CMAKE_SYSTEM_VERSION@")

if("@_INTERNAL_ANDROID_STUDIO_ORIGINAL_CMAKE_TOOLCHAIN_FILE@" STREQUAL "")
# Variable not set, initial project configuration.
# Path to original Android NDK toolchain saved in CMAKE_TOOLCHAIN_FILE.
if("@CMAKE_TOOLCHAIN_FILE@" STREQUAL "")
message(FATAL_ERROR "Unexpected: CMAKE_TOOLCHAIN_FILE is empty")
# Path to original Android NDK toolchain saved in CMAKE_TOOLCHAIN_FILE_CMAKE_PATH.
if("@CMAKE_TOOLCHAIN_FILE_CMAKE_PATH@" STREQUAL "")
message(FATAL_ERROR "Unexpected: CMAKE_TOOLCHAIN_FILE_CMAKE_PATH is empty")
endif()

if(NOT EXISTS "@CMAKE_TOOLCHAIN_FILE@")
if(NOT EXISTS "@CMAKE_TOOLCHAIN_FILE_CMAKE_PATH@")
message(
FATAL_ERROR "CMAKE_TOOLCHAIN_FILE not found: '@CMAKE_TOOLCHAIN_FILE@'"
FATAL_ERROR "File not found: '@CMAKE_TOOLCHAIN_FILE_CMAKE_PATH@'"
)
endif()

set(_original_toolchain_file "@CMAKE_TOOLCHAIN_FILE@")
set(_original_toolchain_file "@CMAKE_TOOLCHAIN_FILE_CMAKE_PATH@")
else()
set(_original_toolchain_file "@_INTERNAL_ANDROID_STUDIO_ORIGINAL_CMAKE_TOOLCHAIN_FILE@")
endif()
Expand Down

0 comments on commit 8786b23

Please sign in to comment.