X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=cmake%2Fcommon.cmake;h=5e107ac7fc7b7afa74c10a412e983c2657d1676c;hb=367dde614dafebf976d24bcc6c0f18d8ed7348c7;hp=a98cac9e13b7c94dd1ea3933aa670505ed956e55;hpb=ea8a8c3528b5f46e91b571d67e7a4fdaeae49ec2;p=staging%2Fxdg-launcher.git diff --git a/cmake/common.cmake b/cmake/common.cmake index a98cac9..5e107ac 100644 --- a/cmake/common.cmake +++ b/cmake/common.cmake @@ -21,14 +21,14 @@ #-------------------------------------------------------------------------- # WARNING: # Do not change this cmake template -# Customise your preferences in "./etc/config.cmake" +# Customise your preferences in "./conf.d/cmake/config.cmake" #-------------------------------------------------------------------------- file(GLOB project_cmakefiles ${PROJECT_APP_TEMPLATES_DIR}/cmake/cmake.d/[0-9][0-9]-*.cmake) list(SORT project_cmakefiles) -file(GLOB home_cmakefiles $ENV{HOME}/.config/cmake.d/[0-9][0-9]-*.cmake) +file(GLOB home_cmakefiles $ENV{HOME}/.config/app-templates/cmake.d/[0-9][0-9]-common*.cmake $ENV{HOME}/.config/app-templates/cmake.d/[0-9][0-9]-${PROJECT_NAME}*.cmake) list(SORT home_cmakefiles) -file(GLOB system_cmakefiles /etc/cmake.d/[0-9][0-9]-*.cmake) +file(GLOB system_cmakefiles /etc/app-templates/cmake.d/[0-9][0-9]-common*.cmake /etc/app-templates/cmake.d/[0-9][0-9]-${PROJECT_NAME}*.cmake) list(SORT system_cmakefiles) foreach(file ${system_cmakefiles} ${home_cmakefiles} ${project_cmakefiles}) @@ -36,17 +36,28 @@ foreach(file ${system_cmakefiles} ${home_cmakefiles} ${project_cmakefiles}) include(${file}) endforeach() -macro(project_build) - set (ARGSLIST ${ARGN}) - list(LENGTH ARGSLIST ARGSNUM) - if(${ARGSNUM} GREATER 0) - set(pattern "${ARGV0}") - else() - set(pattern "*") - endif() - - project_subdirs_add(${pattern}) - project_targets_populate() - project_package_build() - project_closing_msg() -endmacro(project_build) \ No newline at end of file +file(GLOB project_cmakefiles ${ENTRY_POINT}/cmake/[0-9][0-9]-${OSRELEASE}*.cmake ) +list(SORT project_cmakefiles) +if(NOT ${project_cmakefiles}) + file(GLOB project_cmakefiles ${ENTRY_POINT}/cmake/[0-9][0-9]-default*.cmake) +endif() + +foreach(file ${project_cmakefiles}) + message(STATUS "Include: ${file}") + include(${file}) +endforeach() + +if(DEFINED PROJECT_SRC_DIR_PATTERN) + project_subdirs_add(${PROJECT_SRC_DIR_PATTERN}) +else() + project_subdirs_add() +endif(DEFINED PROJECT_SRC_DIR_PATTERN) + +configure_files_in_dir(${PROJECT_APP_TEMPLATES_DIR}/${ENTRY_POINT}/template.d) +configure_files_in_dir($ENV{HOME}/.config/app-templates/scripts) +configure_files_in_dir(/etc/app-templates/scripts) + +project_targets_populate() +remote_targets_populate() +project_package_build() +project_closing_msg()