aboutsummaryrefslogtreecommitdiff
path: root/ports/libodb
diff options
context:
space:
mode:
authorMarco Craveiro <mcraveiro@users.noreply.github.com>2019-02-01 20:25:28 +0000
committerVictor Romero <romerosanchezv@gmail.com>2019-02-01 12:25:28 -0800
commit52390cf481f6fe3962bbbd2b84a62ab4d9702484 (patch)
treef52f1f6259b2762ab8d2dcbe771e606999db560f /ports/libodb
parent9be25c17aaf1fc9a1cf2c86a9225879f5ee45f57 (diff)
downloadvcpkg-52390cf481f6fe3962bbbd2b84a62ab4d9702484.tar.gz
vcpkg-52390cf481f6fe3962bbbd2b84a62ab4d9702484.zip
[libodb] Assorted fixes to get ODB v2.4 libraries to compile on x64 Linux (#5260)
* [libodb] Add configure headers to all libs for Linux * [libodb] Include options files in install
Diffstat (limited to 'ports/libodb')
-rw-r--r--ports/libodb/CMakeLists.txt12
-rw-r--r--ports/libodb/config.unix.h.in20
-rw-r--r--ports/libodb/portfile.cmake6
3 files changed, 35 insertions, 3 deletions
diff --git a/ports/libodb/CMakeLists.txt b/ports/libodb/CMakeLists.txt
index b4aef5817..a49175a8a 100644
--- a/ports/libodb/CMakeLists.txt
+++ b/ports/libodb/CMakeLists.txt
@@ -1,13 +1,21 @@
cmake_minimum_required(VERSION 3.0)
project(libodb VERSION 2.4.0 LANGUAGES CXX)
set(LIBODB_INSTALL_HEADERS ON CACHE BOOL "Install the header files (a debug install)")
+configure_file(config.unix.h.in
+ ${CMAKE_CURRENT_SOURCE_DIR}/odb/details/config.h COPYONLY)
+
file(GLOB_RECURSE libodb_src LIST_DIRECTORIES False
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
*.cxx)
-list(FILTER libodb_src EXCLUDE REGEX /posix/.*)
+if (WIN32)
+ list(FILTER libodb_src EXCLUDE REGEX /posix/.*)
+elseif (UNIX)
+ list(FILTER libodb_src EXCLUDE REGEX /win32/.*)
+endif()
+
add_library(libodb ${libodb_src})
target_include_directories(libodb
- PUBLIC
+ PUBLIC
$<INSTALL_INTERFACE:include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
diff --git a/ports/libodb/config.unix.h.in b/ports/libodb/config.unix.h.in
new file mode 100644
index 000000000..4df77c5c7
--- /dev/null
+++ b/ports/libodb/config.unix.h.in
@@ -0,0 +1,20 @@
+/* odb/details/config.h. Generated from config.h.in by configure. */
+/* file : odb/details/config.h.in
+ * copyright : Copyright (c) 2009-2015 Code Synthesis Tools CC
+ * license : GNU GPL v2; see accompanying LICENSE file
+ */
+
+/* This file is automatically processed by configure. */
+
+#ifndef ODB_DETAILS_CONFIG_H
+#define ODB_DETAILS_CONFIG_H
+
+/* #undef ODB_THREADS_NONE */
+#define ODB_THREADS_POSIX 1
+/* #undef ODB_THREADS_WIN32 */
+#define ODB_THREADS_TLS_KEYWORD 1
+/* #undef ODB_THREADS_TLS_DECLSPEC */
+
+/* #undef LIBODB_STATIC_LIB */
+
+#endif /* ODB_DETAILS_CONFIG_H */
diff --git a/ports/libodb/portfile.cmake b/ports/libodb/portfile.cmake
index 01f326548..017979dc4 100644
--- a/ports/libodb/portfile.cmake
+++ b/ports/libodb/portfile.cmake
@@ -15,7 +15,11 @@ vcpkg_download_distfile(ARCHIVE
SHA512 f1311458634695eb6ba307ebfd492e3b260e7beb06db1c5c46df58c339756be4006322cdc4e42d055bf5b2ad14ce4656ddcafcc4e16c282034db8a77d255c3eb
)
vcpkg_extract_source_archive(${ARCHIVE})
-file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+file(COPY
+ ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt
+ ${CMAKE_CURRENT_LIST_DIR}/config.unix.h.in
+ DESTINATION ${SOURCE_PATH})
+
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS_DEBUG