summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorOBATA Akio <obache@wizdas.com>2020-08-09 17:34:23 +0900
committerSlávek Banko <slavek.banko@axis.cz>2020-08-26 18:11:02 +0200
commitac8c8ca54aaed1466255161a3d727dcfade4a7d9 (patch)
treea16f3955e178f3dca2daf98bf0ade9750aa13f6f /CMakeLists.txt
parent56c5973b6b33df77a7491b07411cbd772c0d5d79 (diff)
downloadtdelibs-ac8c8ca54aaed1466255161a3d727dcfade4a7d9.tar.gz
tdelibs-ac8c8ca54aaed1466255161a3d727dcfade4a7d9.zip
Add a knob to use fixed path `iceauth` tool
`system()` and `popen()` may unsafe unless using absolute command path. Rely on PATH environment variable set by users may result in unwanted tool. Signed-off-by: OBATA Akio <obache@wizdas.com> Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fbb2e6315..48deed0c0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1233,6 +1233,17 @@ if ( WITH_TDEICONLOADER_DEBUG )
endif ( WITH_TDEICONLOADER_DEBUG )
+##### find tools path ###########################
+
+if( NOT WIN32 AND NOT ICEAUTH_PATH )
+ find_program( ICEAUTH_PATH iceauth )
+ if( ${ICEAUTH_PATH} STREQUAL "ICEAUTH_PATH-NOTFOUND" )
+ tde_message_fatal( "iceauth command was not found in path." )
+ endif()
+ message( STATUS "Found iceauth: ${ICEAUTH_PATH}" )
+endif( NOT WIN32 AND NOT ICEAUTH_PATH )
+
+
##### write configure files #####################
configure_file( config.h.cmake config.h )