summaryrefslogtreecommitdiffstats
path: root/cmake/Modules/BuildMacros.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/Modules/BuildMacros.cmake')
-rwxr-xr-xcmake/Modules/BuildMacros.cmake15
1 files changed, 10 insertions, 5 deletions
diff --git a/cmake/Modules/BuildMacros.cmake b/cmake/Modules/BuildMacros.cmake
index 276659525..a1977f980 100755
--- a/cmake/Modules/BuildMacros.cmake
+++ b/cmake/Modules/BuildMacros.cmake
@@ -54,7 +54,7 @@ endmacro()
macro(build_library lib)
cmake_parse_arguments(ARG
"SHARED;STATIC"
- "COMPONENT"
+ "COMPONENT;"
"SOURCES;LINK_LIBRARIES;INSTALL_HEADERS;DEPENDS;INCLUDE_DIRS;DEFINITIONS;INSTALL_ROOT_DIR"
${ARGN}
)
@@ -76,6 +76,11 @@ macro(build_library lib)
add_library(${lib} STATIC ${ARG_SOURCES})
endif()
+ # install .so
+ if(NOT ARG_COMPONENT)
+ set(ARG_COMPONENT hicn)
+ endif()
+
foreach(library ${TARGET_LIBS})
target_compile_options(${library} PRIVATE -Wall)
@@ -107,10 +112,6 @@ macro(build_library lib)
)
endif()
- # install .so
- if(NOT ARG_COMPONENT)
- set(ARG_COMPONENT hicn)
- endif()
install(
TARGETS ${library}
DESTINATION lib
@@ -129,6 +130,10 @@ macro(build_library lib)
set(ARG_INSTALL_ROOT_DIR "hicn")
endif()
+ list(APPEND local_comps
+ ${ARG_COMPONENT}-dev
+ )
+
foreach(file ${ARG_INSTALL_HEADERS})
get_filename_component(_dir ${file} DIRECTORY)
get_filename_component(dir ${_dir} NAME)