2
# Licensed to the Apache Software Foundation (ASF) under one
3
# or more contributor license agreements. See the NOTICE file
4
# distributed with this work for additional information
5
# regarding copyright ownership. The ASF licenses this file
6
# to you under the Apache License, Version 2.0 (the
7
# "License"); you may not use this file except in compliance
8
# with the License. You may obtain a copy of the License at
10
# http://www.apache.org/licenses/LICENSE-2.0
12
# Unless required by applicable law or agreed to in writing,
13
# software distributed under the License is distributed on an
14
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
# KIND, either express or implied. See the License for the
16
# specific language governing permissions and limitations
36
avro_generic_internal.h
81
../jansson/src/error.c
82
../jansson/src/hashtable.c
83
../jansson/src/hashtable.h
84
../jansson/src/jansson.h
85
../jansson/src/jansson_private.h
87
../jansson/src/memory.c
88
../jansson/src/pack_unpack.c
89
../jansson/src/strbuffer.c
90
../jansson/src/strbuffer.h
93
../jansson/src/value.c
96
source_group(Avro FILES ${AVRO_SRC})
97
source_group(Jansson FILES ${JANSSON_SRC})
99
# The version.sh script gives us a SOVERSION that uses colon as a
100
# separator; we need periods.
102
string(REPLACE ":" "." LIBAVRO_DOT_VERSION ${LIBAVRO_VERSION})
104
add_library(avro-static STATIC ${AVRO_SRC} ${JANSSON_SRC})
105
target_link_libraries(avro-static ${CODEC_LIBRARIES} ${THREADS_LIBRARIES})
106
set_target_properties(avro-static PROPERTIES OUTPUT_NAME avro)
109
# TODO: Create Windows DLLs. See http://www.cmake.org/Wiki/BuildingWinDLL
110
add_library(avro-shared SHARED ${AVRO_SRC} ${JANSSON_SRC})
111
target_link_libraries(avro-shared ${CODEC_LIBRARIES} ${THREADS_LIBRARIES})
112
set_target_properties(avro-shared PROPERTIES
114
SOVERSION ${LIBAVRO_DOT_VERSION})
118
${CMAKE_CURRENT_SOURCE_DIR}/avro.h
121
${CMAKE_CURRENT_SOURCE_DIR}/avro
123
FILES_MATCHING PATTERN "*.h")
126
install(TARGETS avro-static
127
RUNTIME DESTINATION bin
128
LIBRARY DESTINATION lib
129
ARCHIVE DESTINATION lib
132
install(TARGETS avro-static avro-shared
133
RUNTIME DESTINATION bin
134
LIBRARY DESTINATION lib
135
ARCHIVE DESTINATION lib
139
# Install pkg-config file
141
set(prefix ${CMAKE_INSTALL_PREFIX})
142
set(VERSION ${AVRO_VERSION})
143
configure_file(avro-c.pc.in avro-c.pc)
144
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/avro-c.pc
145
DESTINATION lib/pkgconfig)
147
add_executable(avrocat avrocat.c)
148
target_link_libraries(avrocat avro-static)
149
install(TARGETS avrocat RUNTIME DESTINATION bin)
151
add_executable(avroappend avroappend.c)
152
target_link_libraries(avroappend avro-static)
153
install(TARGETS avroappend RUNTIME DESTINATION bin)
156
#TODO: Port getopt() to Windows to compile avropipe.c and avromod.c
157
add_executable(avropipe avropipe.c)
158
target_link_libraries(avropipe avro-static)
159
install(TARGETS avropipe RUNTIME DESTINATION bin)
161
add_executable(avromod avromod.c)
162
target_link_libraries(avromod avro-static)
163
install(TARGETS avromod RUNTIME DESTINATION bin)