summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--templates/html5/etc/macros.cmake5
-rw-r--r--templates/hybrid-html5/etc/macros.cmake5
-rw-r--r--templates/native/etc/macros.cmake5
-rw-r--r--templates/service/etc/macros.cmake5
4 files changed, 12 insertions, 8 deletions
diff --git a/templates/html5/etc/macros.cmake b/templates/html5/etc/macros.cmake
index 98ea3b5..5514679 100644
--- a/templates/html5/etc/macros.cmake
+++ b/templates/html5/etc/macros.cmake
@@ -30,7 +30,7 @@
macro(PROJECT_TARGET_ADD TARGET_NAME)
set_property(GLOBAL APPEND PROPERTY PROJECT_TARGETS ${TARGET_NAME})
set(TARGET_NAME ${TARGET_NAME})
-endmacro()
+endmacro(PROJECT_TARGET_ADD)
# Check GCC minimal version version
if (gcc_minimal_version)
@@ -250,7 +250,8 @@ endif()
# Print developer helper message when build is done
# -------------------------------------------------------
macro(project_closing_msg)
- if(CLOSING_MESSAGE AND PROJECT_TARGETS)
+ get_property(PROJECT_TARGETS GLOBAL PROPERTY PROJECT_TARGETS)
+ if(CLOSING_MESSAGE AND ${PROJECT_TARGETS})
add_custom_target(${PROJECT_NAME}_build_done ALL
COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --cyan "++ ${CLOSING_MESSAGE}"
)
diff --git a/templates/hybrid-html5/etc/macros.cmake b/templates/hybrid-html5/etc/macros.cmake
index 98ea3b5..5514679 100644
--- a/templates/hybrid-html5/etc/macros.cmake
+++ b/templates/hybrid-html5/etc/macros.cmake
@@ -30,7 +30,7 @@
macro(PROJECT_TARGET_ADD TARGET_NAME)
set_property(GLOBAL APPEND PROPERTY PROJECT_TARGETS ${TARGET_NAME})
set(TARGET_NAME ${TARGET_NAME})
-endmacro()
+endmacro(PROJECT_TARGET_ADD)
# Check GCC minimal version version
if (gcc_minimal_version)
@@ -250,7 +250,8 @@ endif()
# Print developer helper message when build is done
# -------------------------------------------------------
macro(project_closing_msg)
- if(CLOSING_MESSAGE AND PROJECT_TARGETS)
+ get_property(PROJECT_TARGETS GLOBAL PROPERTY PROJECT_TARGETS)
+ if(CLOSING_MESSAGE AND ${PROJECT_TARGETS})
add_custom_target(${PROJECT_NAME}_build_done ALL
COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --cyan "++ ${CLOSING_MESSAGE}"
)
diff --git a/templates/native/etc/macros.cmake b/templates/native/etc/macros.cmake
index 98ea3b5..5514679 100644
--- a/templates/native/etc/macros.cmake
+++ b/templates/native/etc/macros.cmake
@@ -30,7 +30,7 @@
macro(PROJECT_TARGET_ADD TARGET_NAME)
set_property(GLOBAL APPEND PROPERTY PROJECT_TARGETS ${TARGET_NAME})
set(TARGET_NAME ${TARGET_NAME})
-endmacro()
+endmacro(PROJECT_TARGET_ADD)
# Check GCC minimal version version
if (gcc_minimal_version)
@@ -250,7 +250,8 @@ endif()
# Print developer helper message when build is done
# -------------------------------------------------------
macro(project_closing_msg)
- if(CLOSING_MESSAGE AND PROJECT_TARGETS)
+ get_property(PROJECT_TARGETS GLOBAL PROPERTY PROJECT_TARGETS)
+ if(CLOSING_MESSAGE AND ${PROJECT_TARGETS})
add_custom_target(${PROJECT_NAME}_build_done ALL
COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --cyan "++ ${CLOSING_MESSAGE}"
)
diff --git a/templates/service/etc/macros.cmake b/templates/service/etc/macros.cmake
index 98ea3b5..5514679 100644
--- a/templates/service/etc/macros.cmake
+++ b/templates/service/etc/macros.cmake
@@ -30,7 +30,7 @@
macro(PROJECT_TARGET_ADD TARGET_NAME)
set_property(GLOBAL APPEND PROPERTY PROJECT_TARGETS ${TARGET_NAME})
set(TARGET_NAME ${TARGET_NAME})
-endmacro()
+endmacro(PROJECT_TARGET_ADD)
# Check GCC minimal version version
if (gcc_minimal_version)
@@ -250,7 +250,8 @@ endif()
# Print developer helper message when build is done
# -------------------------------------------------------
macro(project_closing_msg)
- if(CLOSING_MESSAGE AND PROJECT_TARGETS)
+ get_property(PROJECT_TARGETS GLOBAL PROPERTY PROJECT_TARGETS)
+ if(CLOSING_MESSAGE AND ${PROJECT_TARGETS})
add_custom_target(${PROJECT_NAME}_build_done ALL
COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --cyan "++ ${CLOSING_MESSAGE}"
)