summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllen Winter <allen.winter@kdab.com>2022-03-05 13:05:47 -0500
committerAllen Winter <allen.winter@kdab.com>2022-03-05 13:05:47 -0500
commite6a7b1f1595b0609e69752144cdae3efed0ab610 (patch)
tree9f3db8b0e079c1ec10ee486df2e50a2b88b711fc
parent03c02ced21494413920744a400c638b0cb5d493f (diff)
downloadlibical-git-e6a7b1f1595b0609e69752144cdae3efed0ab610.tar.gz
buildsystem - fix more uninitialized cmake variables
-rw-r--r--CMakeLists.txt5
-rw-r--r--config.h.cmake2
-rw-r--r--examples/CMakeLists.txt4
-rw-r--r--src/libical/CMakeLists.txt9
-rw-r--r--src/libicalss/CMakeLists.txt4
-rw-r--r--src/test/CMakeLists.txt4
6 files changed, 20 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 604cd533..a8733d24 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -286,6 +286,7 @@ add_feature_info(
BerkeleyDB_FOUND
"build in support for Berkeley DB storage"
)
+set(BDB_FOUND False)
if(BerkeleyDB_FOUND)
set(HAVE_BDB True)
add_definitions(-DDB_DBM_HSEARCH=0) #set to 1 if hsearch support is needed
@@ -714,7 +715,9 @@ if(IS_ABSOLUTE ${INCLUDE_INSTALL_DIR})
else()
set(includedir "\${prefix}/include")
endif()
-set(PTHREAD_LIBS "${CMAKE_THREAD_LIBS_INIT}")
+if(DEFINED CMAKE_THREAD_LIBS_INIT)
+ set(PTHREAD_LIBS "${CMAKE_THREAD_LIBS_INIT}")
+endif()
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/libical.pc.in
diff --git a/config.h.cmake b/config.h.cmake
index e8796974..958ffd1d 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -543,7 +543,7 @@ typedef ssize_t IO_SSIZE_T;
/* Unused argument macro */
#if !defined(_unused)
#if defined(__LCLINT__) || defined(S_SPLINT_S)
-#define _unused(x) /*@unused@*/ x
+#define _unused(x) x
#else
#define _unused(x) (void)x
#endif
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 0c241f4d..46bde676 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -28,7 +28,9 @@ else()
icalss-static
icalvcal-static
)
- target_link_libraries(doesnothing ${CMAKE_THREAD_LIBS_INIT})
+ if(DEFINED CMAKE_THREAD_LIBS_INIT)
+ target_link_libraries(doesnothing ${CMAKE_THREAD_LIBS_INIT})
+ endif()
if(ICU_FOUND)
target_link_libraries(doesnothing ${ICU_LIBRARIES})
endif()
diff --git a/src/libical/CMakeLists.txt b/src/libical/CMakeLists.txt
index 441889d5..920885e9 100644
--- a/src/libical/CMakeLists.txt
+++ b/src/libical/CMakeLists.txt
@@ -273,8 +273,9 @@ endif()
target_include_directories(ical INTERFACE "$<INSTALL_INTERFACE:${INCLUDE_INSTALL_DIR}>")
-target_link_libraries(ical ${CMAKE_THREAD_LIBS_INIT})
-
+if(DEFINED CMAKE_THREAD_LIBS_INIT)
+ target_link_libraries(ical ${CMAKE_THREAD_LIBS_INIT})
+endif()
if(ICU_FOUND)
target_link_libraries(ical ${ICU_LIBRARIES})
endif()
@@ -340,7 +341,9 @@ if(WITH_CXX_BINDINGS)
elseif(STATIC_ONLY)
add_library(ical_cxx-static ALIAS ical_cxx)
endif()
- target_link_libraries(ical_cxx ical ${CMAKE_THREAD_LIBS_INIT})
+ if(${CMAKE_THREAD_LIBS_INIT})
+ target_link_libraries(ical_cxx ical ${CMAKE_THREAD_LIBS_INIT})
+ endif()
if(MSVC)
set_target_properties(ical_cxx PROPERTIES PREFIX "lib")
diff --git a/src/libicalss/CMakeLists.txt b/src/libicalss/CMakeLists.txt
index 7857cb56..b449b043 100644
--- a/src/libicalss/CMakeLists.txt
+++ b/src/libicalss/CMakeLists.txt
@@ -144,7 +144,9 @@ if(WITH_CXX_BINDINGS)
add_library(icalss_cxx-static ALIAS icalss_cxx)
endif()
- target_link_libraries(icalss_cxx icalss ical_cxx ${CMAKE_THREAD_LIBS_INIT})
+ if(DEFINED CMAKE_THREAD_LIBS_INIT)
+ target_link_libraries(icalss_cxx icalss ical_cxx ${CMAKE_THREAD_LIBS_INIT})
+ endif()
if(MSVC)
set_target_properties(icalss_cxx PROPERTIES PREFIX "lib")
diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt
index 29001dba..8bba8747 100644
--- a/src/test/CMakeLists.txt
+++ b/src/test/CMakeLists.txt
@@ -61,7 +61,9 @@ macro(buildme _name _srcs)
target_link_libraries(${_name} ical_cxx icalss_cxx)
endif()
- target_link_libraries(${_name} ${CMAKE_THREAD_LIBS_INIT})
+ if(DEFINED CMAKE_THREAD_LIBS_INIT)
+ target_link_libraries(${_name} ${CMAKE_THREAD_LIBS_INIT})
+ endif()
if(ICU_FOUND)
target_link_libraries(${_name} ${ICU_LIBRARIES})
endif()