Make maxutils a standalone library
The only way to cleanly separate the maxutils library from the MaxScale CMake project is to make it a standalone CMake project. With the help of ExternalProject, it should be relatively easy to use.
This commit is contained in:
@ -1 +1,4 @@
|
||||
project(maxutils)
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
set(CMAKE_CXX_FLAGS "-fPIC -std=c++11 -ggdb -Wall -Werror -Wno-unused-function")
|
||||
add_subdirectory(maxbase)
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
include_directories(include)
|
||||
add_library(maxbase SHARED src/eventcount.cc src/stopwatch.cc)
|
||||
set_target_properties(maxbase PROPERTIES VERSION "1.0.0")
|
||||
install_module(maxbase core)
|
||||
add_subdirectory(include/maxbase)
|
||||
add_subdirectory(src)
|
||||
|
||||
10
maxutils/maxbase/include/maxbase/CMakeLists.txt
Normal file
10
maxutils/maxbase/include/maxbase/CMakeLists.txt
Normal file
@ -0,0 +1,10 @@
|
||||
set(TYPES "*.h" "*.hh")
|
||||
foreach(type ${TYPES})
|
||||
file(GLOB HEADERS ${type})
|
||||
foreach(var ${HEADERS})
|
||||
get_filename_component(header ${var} NAME)
|
||||
install(FILES ${header} DESTINATION include/maxbase)
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
|
||||
3
maxutils/maxbase/src/CMakeLists.txt
Normal file
3
maxutils/maxbase/src/CMakeLists.txt
Normal file
@ -0,0 +1,3 @@
|
||||
add_library(maxbase STATIC eventcount.cc stopwatch.cc)
|
||||
set_target_properties(maxbase PROPERTIES VERSION "1.0.0" LINK_FLAGS -Wl,-z,defs)
|
||||
install(TARGETS maxbase DESTINATION lib)
|
||||
Reference in New Issue
Block a user