Skip to content

Commit 61244e7

Browse files
vepadulanolinev
authored andcommitted
Avoid try_run when cross-compiling
1 parent 83dd2e4 commit 61244e7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

cmake/modules/FindFTGL.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ if(FTGL_FOUND)
3535
LINK_LIBRARIES ${FTGL_LIBRARY}
3636
OUTPUT_VARIABLE FTGL_VERSION_API_LOG
3737
)
38-
if (FTGL_VERSION_API)
38+
# try_run cannot be used when cross-compiling
39+
if (FTGL_VERSION_API AND NOT CMAKE_CROSSCOMPILING)
3940
try_run(RUN_RESULT COMPILE_RESULT
4041
"${CMAKE_BINARY_DIR}"
4142
"${FTGL_VERSION_SRC}"

0 commit comments

Comments
 (0)