Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,12 @@ if(HOST_OS STREQUAL "linux")
link_libraries(dl)
endif(HOST_OS STREQUAL "linux")

if (HOST_OS STREQUAL "darwin")
set(CMAKE_MACOSX_RPATH 1)
endif(HOST_OS STREQUAL "darwin")

set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")

add_compile_definitions(${HOST_OS} PACKAGE_NAME="ats" PACKAGE_VERSION="${TS_VERSION_STRING}")
add_compile_options(-Wno-invalid-offsetof)

Expand Down Expand Up @@ -175,6 +181,7 @@ configure_file(include/tscore/ink_config.h.cmake.in include/tscore/ink_config.h)
configure_file(include/ts/apidefs.h.in include/ts/apidefs.h)

add_subdirectory(src/tscpp/util)
add_subdirectory(src/tscpp/api)
add_subdirectory(src/tscore)
add_subdirectory(src/records)
add_subdirectory(iocore)
Expand All @@ -184,3 +191,5 @@ add_subdirectory(mgmt/config)
add_subdirectory(mgmt/rpc)
add_subdirectory(src/traffic_server)
add_subdirectory(src/tests)
add_subdirectory(plugins)
add_subdirectory(configs)
24 changes: 24 additions & 0 deletions configs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Makefile.am for config
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

file(GLOB CONFIG_FILES *.default)

foreach(CONFIG_FILE ${CONFIG_FILES})
cmake_path(GET CONFIG_FILE STEM LAST_ONLY CONFIG_FILE_NAME)
install(FILES ${CONFIG_FILE} DESTINATION etc/trafficserver RENAME ${CONFIG_FILE_NAME})
endforeach()
2 changes: 1 addition & 1 deletion iocore/eventsystem/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#######################


add_library(inkevent SHARED
add_library(inkevent STATIC
EventSystem.cc
IOBuffer.cc
Inline.cc
Expand Down
3 changes: 3 additions & 0 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@
# yamlcpp shadows a bunch of variables but we don't want to hear bout it
add_compile_options(-Wno-shadow)
set(BUILD_SHARED_LIBS 1)
set(YAML_CPP_INSTALL ON)
add_subdirectory(yamlcpp)
set(YAML_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/lib/yamlcpp/include PARENT_SCOPE)
add_subdirectory(fastlz)
add_subdirectory(swoc)
set(SWOC_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/lib/swoc/include PARENT_SCOPE)

install(TARGETS libswoc yaml-cpp)
1 change: 1 addition & 0 deletions lib/fastlz/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@

add_library(fastlz)
target_sources(fastlz PRIVATE fastlz.cc fastlz.h)
install(TARGETS fastlz)
42 changes: 42 additions & 0 deletions plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#######################
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor license
# agreements. See the NOTICE file distributed with this work for additional information regarding
# copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed under the License
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
# or implied. See the License for the specific language governing permissions and limitations under
# the License.
#
#######################

set(CMAKE_SHARED_LIBRARY_PREFIX "")

function(add_atsplugin name)
add_library(${name} MODULE ${ARGN})
set_target_properties(${name} PROPERTIES PREFIX "")
set_target_properties(${name} PROPERTIES SUFFIX ".so")
set_target_properties(${name} PROPERTIES LINK_FLAGS "-Wl,-rpath,${CMAKE_INSTALL_PREFIX}/lib")
install(TARGETS ${name} DESTINATION libexec/trafficserver)
endfunction()

if(APPLE)
set(CMAKE_MODULE_LINKER_FLAGS "-undefined dynamic_lookup")
endif()

add_subdirectory(authproxy)
add_subdirectory(background_fetch)
add_subdirectory(cache_promote)
add_subdirectory(cache_range_requests)
add_subdirectory(cachekey)
add_subdirectory(certifier)
add_subdirectory(compress)
add_subdirectory(conf_remap)

add_subdirectory(generator)
add_subdirectory(xdebug)
18 changes: 18 additions & 0 deletions plugins/authproxy/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#######################
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor license
# agreements. See the NOTICE file distributed with this work for additional information regarding
# copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed under the License
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
# or implied. See the License for the specific language governing permissions and limitations under
# the License.
#
#######################

add_atsplugin(authproxy authproxy.cc utils.cc)
23 changes: 23 additions & 0 deletions plugins/background_fetch/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#######################
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor license
# agreements. See the NOTICE file distributed with this work for additional information regarding
# copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed under the License
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
# or implied. See the License for the specific language governing permissions and limitations under
# the License.
#
#######################

add_atsplugin(background_fetch
background_fetch.cc
configs.cc
headers.cc
rules.cc
)
24 changes: 24 additions & 0 deletions plugins/cache_promote/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#######################
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor license
# agreements. See the NOTICE file distributed with this work for additional information regarding
# copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed under the License
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
# or implied. See the License for the specific language governing permissions and limitations under
# the License.
#
#######################

add_atsplugin(cache_promote
cache_promote.cc
configs.cc
policy.cc
lru_policy.cc
policy_manager.cc
)
20 changes: 20 additions & 0 deletions plugins/cache_range_requests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#######################
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor license
# agreements. See the NOTICE file distributed with this work for additional information regarding
# copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed under the License
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
# or implied. See the License for the specific language governing permissions and limitations under
# the License.
#
#######################

add_atsplugin(cache_range_requests
cache_range_requests.cc
)
24 changes: 24 additions & 0 deletions plugins/cachekey/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#######################
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor license
# agreements. See the NOTICE file distributed with this work for additional information regarding
# copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed under the License
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
# or implied. See the License for the specific language governing permissions and limitations under
# the License.
#
#######################

add_atsplugin(cachekey
cachekey.cc
common.cc
configs.cc
pattern.cc
plugin.cc
)
18 changes: 18 additions & 0 deletions plugins/certifier/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#######################
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor license
# agreements. See the NOTICE file distributed with this work for additional information regarding
# copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed under the License
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
# or implied. See the License for the specific language governing permissions and limitations under
# the License.
#
#######################

add_atsplugin(certifier certifier.cc)
22 changes: 22 additions & 0 deletions plugins/compress/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#######################
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor license
# agreements. See the NOTICE file distributed with this work for additional information regarding
# copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed under the License
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
# or implied. See the License for the specific language governing permissions and limitations under
# the License.
#
#######################

add_atsplugin(compress
compress.cc
configuration.cc
misc.cc
)
2 changes: 1 addition & 1 deletion plugins/compress/compress.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <cstring>
#include <zlib.h>

#include "ink_autoconf.h"
#include "tscore/ink_config.h"

#if HAVE_BROTLI_ENCODE_H
#include <brotli/encode.h>
Expand Down
2 changes: 1 addition & 1 deletion plugins/compress/configuration.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
limitations under the License.
*/

#include "ink_autoconf.h"
#include "tscore/ink_config.h"
#include "configuration.h"
#include <fstream>
#include <algorithm>
Expand Down
20 changes: 20 additions & 0 deletions plugins/conf_remap/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#######################
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor license
# agreements. See the NOTICE file distributed with this work for additional information regarding
# copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed under the License
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
# or implied. See the License for the specific language governing permissions and limitations under
# the License.
#
#######################

add_atsplugin(conf_remap
conf_remap.cc
)
18 changes: 18 additions & 0 deletions plugins/generator/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#######################
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor license
# agreements. See the NOTICE file distributed with this work for additional information regarding
# copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed under the License
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
# or implied. See the License for the specific language governing permissions and limitations under
# the License.
#
#######################

add_atsplugin(generator generator.cc)
18 changes: 18 additions & 0 deletions plugins/xdebug/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#######################
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor license
# agreements. See the NOTICE file distributed with this work for additional information regarding
# copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed under the License
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
# or implied. See the License for the specific language governing permissions and limitations under
# the License.
#
#######################

add_atsplugin(xdebug xdebug.cc)
3 changes: 2 additions & 1 deletion src/records/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,5 @@ target_include_directories(records_p PRIVATE
${CMAKE_SOURCE_DIR}/iocore/eventsystem
${CMAKE_SOURCE_DIR}/iocore/utils
)
target_link_libraries(records_p tscore libswoc)
target_link_libraries(records_p tscore libswoc)
install(TARGETS records_p)
2 changes: 2 additions & 0 deletions src/traffic_server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,5 @@ if (TS_USE_LINUX_IO_URING)
target_link_libraries(traffic_server inkuring uring)
endif (TS_USE_LINUX_IO_URING)

install(TARGETS traffic_server)

2 changes: 2 additions & 0 deletions src/tscore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -142,3 +142,5 @@ add_executable(test_tscore
)
target_link_libraries(test_tscore PRIVATE tscore inkevent records_p libswoc)
target_include_directories(test_tscore PRIVATE ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/iocore/eventsystem ${CATCH_INCLUDE_DIR})

install(TARGETS tscore)
Loading