2 # tuklib_progname.cmake - see tuklib_progname.m4 for description and comments
6 # This file has been put into the public domain.
7 # You can do whatever you want with this file.
10 include("${CMAKE_CURRENT_LIST_DIR}/tuklib_common.cmake")
11 include(CheckSymbolExists)
13 function(tuklib_progname TARGET_OR_ALL)
14 # NOTE: This glibc extension requires _GNU_SOURCE.
15 check_symbol_exists(program_invocation_name errno.h
16 HAVE_PROGRAM_INVOCATION_NAME)
17 tuklib_add_definition_if("${TARGET_OR_ALL}" HAVE_PROGRAM_INVOCATION_NAME)