summaryrefslogtreecommitdiff
path: root/cmake/helpers/EflMacros.cmake
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>2017-01-26 13:58:26 -0200
committerGustavo Sverzut Barbieri <barbieri@profusion.mobi>2017-01-26 14:23:24 -0200
commit18af6422a07f447de84201fd94b32c24ce80d70d (patch)
treeed5b4541b0031e9395500039ce75161f3158da78 /cmake/helpers/EflMacros.cmake
parentf4744e1d2a6cb1698400dd9922edaf7ac56d100d (diff)
cmake: auto-detect binaries in src/bin/libname if no CMakeLists.txt
similar to tests, binaries should also follow the same rule and allow single-binaries with single-source.
Diffstat (limited to '')
-rw-r--r--cmake/helpers/EflMacros.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/cmake/helpers/EflMacros.cmake b/cmake/helpers/EflMacros.cmake
index 098d229165..002b06e00d 100644
--- a/cmake/helpers/EflMacros.cmake
+++ b/cmake/helpers/EflMacros.cmake
@@ -700,6 +700,8 @@ endfunction()
700# 700#
701# Internal function to process bins of current EFL_LIB() 701# Internal function to process bins of current EFL_LIB()
702function(_EFL_LIB_PROCESS_BINS_INTERNAL) 702function(_EFL_LIB_PROCESS_BINS_INTERNAL)
703 unset(${EFL_LIB_CURRENT}_BINS CACHE)
704
703 if(EXISTS ${EFL_BIN_SOURCE_DIR}/CMakeLists.txt) 705 if(EXISTS ${EFL_BIN_SOURCE_DIR}/CMakeLists.txt)
704 EFL_BIN(${EFL_LIB_CURRENT}) 706 EFL_BIN(${EFL_LIB_CURRENT})
705 else() 707 else()
@@ -711,6 +713,10 @@ function(_EFL_LIB_PROCESS_BINS_INTERNAL)
711 endforeach() 713 endforeach()
712 endif() 714 endif()
713 715
716 if(NOT ${EFL_LIB_CURRENT}_BINS AND EXISTS ${EFL_BIN_SOURCE_DIR} AND NOT EXISTS ${EFL_BIN_SOURCE_DIR}/CMakeLists.txt)
717 EFL_BIN(${EFL_LIB_CURRENT})
718 endif()
719
714 if(${EFL_LIB_CURRENT}_BINS) 720 if(${EFL_LIB_CURRENT}_BINS)
715 add_custom_target(${EFL_LIB_CURRENT}-bins DEPENDS ${${EFL_LIB_CURRENT}_BINS}) 721 add_custom_target(${EFL_LIB_CURRENT}-bins DEPENDS ${${EFL_LIB_CURRENT}_BINS})
716 endif() 722 endif()
@@ -1091,6 +1097,8 @@ function(EFL_BIN _binname)
1091 if(INSTALL_DIR) 1097 if(INSTALL_DIR)
1092 install(TARGETS ${_bintarget} RUNTIME DESTINATION ${INSTALL_DIR}) 1098 install(TARGETS ${_bintarget} RUNTIME DESTINATION ${INSTALL_DIR})
1093 endif() 1099 endif()
1100
1101 LIST_APPEND_GLOBAL(${EFL_LIB_CURRENT}_BINS ${_bintarget})
1094endfunction() 1102endfunction()
1095 1103
1096# EFL_TEST(Name) 1104# EFL_TEST(Name)