summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorMauro Sardara <msardara@cisco.com>2020-09-18 17:39:03 +0200
committerMauro Sardara <msardara@cisco.com>2020-09-18 17:41:14 +0200
commit20a773677230374ffa2d5d140f7d46032fb7bc9d (patch)
tree972ba743c7b1cfbbabd38024215af670d4dc2e3c /cmake
parent22738e6177e9e1348e5a9c23c5a71e1d1ef7246f (diff)
Revert to [HICN-638] Check if systemd is running before enabling hicn-light service
Signed-off-by: Mauro Sardara <msardara@cisco.com> Change-Id: I1810d96e001a4e6e097e1efa331b682af750925d
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Modules/BuildMacros.cmake25
1 files changed, 7 insertions, 18 deletions
diff --git a/cmake/Modules/BuildMacros.cmake b/cmake/Modules/BuildMacros.cmake
index c84ea1b33..d360d26af 100644
--- a/cmake/Modules/BuildMacros.cmake
+++ b/cmake/Modules/BuildMacros.cmake
@@ -21,7 +21,7 @@ macro(build_executable exec)
cmake_parse_arguments(ARG
"NO_INSTALL"
"COMPONENT"
- "SOURCES;LINK_LIBRARIES;DEPENDS;INCLUDE_DIRS;DEFINITIONS;LINK_FLAGS;COMPILE_FLAGS"
+ "SOURCES;LINK_LIBRARIES;DEPENDS;INCLUDE_DIRS;DEFINITIONS;LINK_FLAGS"
${ARGN}
)
@@ -38,7 +38,6 @@ macro(build_executable exec)
LIBRARY_OUTPUT_DIRECTORY "${BUILD_ROOT}/lib"
RUNTIME_OUTPUT_DIRECTORY "${BUILD_ROOT}/bin"
LINK_FLAGS "${ARG_LINK_FLAGS}"
- COMPILE_FLAGS "${ARG_COMPILE_FLAGS}"
)
if(ARG_LINK_LIBRARIES)
@@ -74,14 +73,10 @@ macro(build_library lib)
cmake_parse_arguments(ARG
"SHARED;STATIC;NO_DEV"
"COMPONENT;"
- "SOURCES;LINK_LIBRARIES;INSTALL_HEADERS;DEPENDS;INCLUDE_DIRS;DEFINITIONS;HEADER_ROOT_DIR;LIBRARY_ROOT_DIR;INSTALL_FULL_PATH_DIR;EMPTY_PREFIX;LINK_FLAGS;COMPILE_FLAGS"
+ "SOURCES;LINK_LIBRARIES;INSTALL_HEADERS;DEPENDS;INCLUDE_DIRS;DEFINITIONS;INSTALL_ROOT_DIR;INSTALL_FULL_PATH_DIR;EMPTY_PREFIX;"
${ARGN}
)
- message("Building library ${lib}")
-
- unset(TARGET_LIBS)
-
if (ARG_SHARED)
list(APPEND TARGET_LIBS
${lib}.shared
@@ -120,8 +115,6 @@ macro(build_library lib)
ARCHIVE_OUTPUT_DIRECTORY "${BUILD_ROOT}/lib"
LIBRARY_OUTPUT_DIRECTORY "${BUILD_ROOT}/lib"
RUNTIME_OUTPUT_DIRECTORY "${BUILD_ROOT}/bin"
- LINK_FLAGS "${ARG_LINK_FLAGS}"
- COMPILE_FLAGS "${ARG_COMPILE_FLAGS}"
)
else ()
set_target_properties(${library}
@@ -131,8 +124,6 @@ macro(build_library lib)
ARCHIVE_OUTPUT_DIRECTORY "${BUILD_ROOT}/lib"
LIBRARY_OUTPUT_DIRECTORY "${BUILD_ROOT}/lib"
RUNTIME_OUTPUT_DIRECTORY "${BUILD_ROOT}/bin"
- LINK_FLAGS "${ARG_LINK_FLAGS}"
- COMPILE_FLAGS "${ARG_COMPILE_FLAGS}"
)
endif()
@@ -148,7 +139,6 @@ macro(build_library lib)
PROPERTIES
OUTPUT_NAME ${lib}
)
- message(STATUS "Output name will be ${lib}")
endif ()
# library deps
@@ -167,7 +157,7 @@ macro(build_library lib)
)
endif()
- set(INSTALL_LIB_PATH "${CMAKE_INSTALL_LIBDIR}/${ARG_LIBRARY_ROOT_DIR}")
+ set(INSTALL_LIB_PATH ${CMAKE_INSTALL_LIBDIR})
if (ARG_INSTALL_FULL_PATH_DIR)
set(INSTALL_LIB_PATH ${ARG_INSTALL_FULL_PATH_DIR})
@@ -188,8 +178,8 @@ macro(build_library lib)
# install headers
if(ARG_INSTALL_HEADERS)
- if (NOT ARG_HEADER_ROOT_DIR)
- set(ARG_HEADER_ROOT_DIR "hicn")
+ if (NOT ARG_INSTALL_ROOT_DIR)
+ set(ARG_INSTALL_ROOT_DIR "hicn")
endif()
list(APPEND local_comps
@@ -207,7 +197,7 @@ macro(build_library lib)
if ("${dir}" STREQUAL includes)
set(dir "")
endif()
- if ("${dir}" STREQUAL ${ARG_HEADER_ROOT_DIR})
+ if ("${dir}" STREQUAL ${ARG_INSTALL_ROOT_DIR})
set(dir "")
endif()
else()
@@ -220,7 +210,7 @@ macro(build_library lib)
endif()
install(
FILES ${file}
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${ARG_HEADER_ROOT_DIR}/${dir}
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${ARG_INSTALL_ROOT_DIR}/${dir}
COMPONENT ${COMPONENT}
)
endforeach()
@@ -243,4 +233,3 @@ endmacro(AddTest)
include(IosMacros)
include(WindowsMacros)
-