aboutsummaryrefslogtreecommitdiff
path: root/databases/iowow/files/patch-src_CMakeLists.txt
blob: 3f42057dd4b50925f04549120e6f516bf1713377 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
--- src/CMakeLists.txt.orig	2019-03-29 16:56:25 UTC
+++ src/CMakeLists.txt
@@ -100,6 +100,11 @@ if (HAVE_CLOCK_MONOTONIC)
   add_definitions(-DIW_HAVE_CLOCK_MONOTONIC)
 endif()
 
+check_symbol_exists(basename_r libgen.h HAVE_BASENAME_R)
+if (HAVE_BASENAME_R)
+  set_source_files_properties(log/iwlog.c PROPERTIES COMPILE_FLAGS -DIW_HAVE_BASENAME_R)
+endif()
+
 foreach(HF IN ITEMS stdlib stddef stdint stdbool stdatomic unistd dirent)
     string(TOUPPER "${HF}" UHF)
     check_include_file(${HF}.h "IW_HAVE_${UHF}")
@@ -164,7 +169,7 @@ endif()
 
 set(CMAKE_C_FLAGS_DEBUG "-O0 -g -ggdb -Werror -DDEBUG -D_DEBUG -UNDEBUG \
                          -Wno-unused-variable ${CMAKE_C_ASAN}")
-set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG ${CMAKE_C_ASAN}")
+set(CMAKE_C_FLAGS_RELEASE "-DNDEBUG ${CMAKE_C_ASAN}")
 set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELEASE} -g")
 
 
@@ -187,7 +192,7 @@ file(GLOB PROJECT_GENERATED_HDRS ${PROJECT_GENERATED_D
 list(APPEND ALL_HDRS ${PROJECT_GENERATED_HDRS})
 
 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tmpl/libiowow.pc.in ${PROJECT_GENERATED_DIR}/libiowow.pc @ONLY)
-install(FILES ${PROJECT_GENERATED_DIR}/libiowow.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+install(FILES ${PROJECT_GENERATED_DIR}/libiowow.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}data/pkgconfig)
 
 foreach(MODULE IN LISTS MODULES)
     if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${MODULE}/CMakeLists.txt)
@@ -278,7 +283,6 @@ endif()
 
 
 install(FILES
-        ${CMAKE_SOURCE_DIR}/LICENSE
         ${CMAKE_SOURCE_DIR}/Changelog
         DESTINATION ${CMAKE_INSTALL_DOCDIR})
 install(FILES