Set TARGET_EXECUTABLE in CMake pro

experiment/meta_header
Martchus 7 years ago
parent b46164e893
commit 46edfccc8f
  1. 2
      cmake/modules/AppTarget.cmake
  2. 3
      cmake/modules/BasicConfig.cmake

@ -99,7 +99,7 @@ endfunction()
# convenience function to add *.desktop file from project meta data
function(add_desktop_file)
add_custom_desktop_file(
"${TARGET_PREFIX}${META_PROJECT_NAME}${TARGET_SUFFIX}"
"${TARGET_EXECUTABLE}"
"${META_APP_NAME}"
"${META_APP_DESCRIPTION}"
"${META_APP_CATEGORIES}"

@ -29,6 +29,9 @@ if(NOT META_PROJECT_VARNAME_UPPER)
string(TOUPPER ${META_PROJECT_VARNAME} META_PROJECT_VARNAME_UPPER)
endif()
# set TARGET_EXECUTABLE which is used to refer to the target executable at its installation location
set(TARGET_EXECUTABLE "${CMAKE_INSTALL_PREFIX}/bin/${TARGET_PREFIX}${META_PROJECT_NAME}${TARGET_SUFFIX}")
# find config.h template
include(TemplateFinder)
find_template_file("config.h" CPP_UTILITIES CONFIG_H_TEMPLATE_FILE)

Loading…
Cancel
Save