Skip to content

Commit

Permalink
Added libpq support to qt5
Browse files Browse the repository at this point in the history
qt5 changes

more qt5 changes

added libpq to qt5

fix merge

fixed left over git thing
  • Loading branch information
charlie barto authored and barcharcraz committed Dec 2, 2016
1 parent 7939992 commit 67303f1
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
4 changes: 4 additions & 0 deletions ports/libpq/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 3.5)
project(libpq VERSION 9.6.1 LANGUAGES C)

find_package(OpenSSL REQUIRED)
set(CMAKE_DEBUG_POSTFIX "d")
configure_file(${CMAKE_CURRENT_LIST_DIR}/src/include/pg_config.h.win32 ${CMAKE_CURRENT_LIST_DIR}/src/include/pg_config.h)
configure_file(${CMAKE_CURRENT_LIST_DIR}/src/include/pg_config_ext.h.win32 ${CMAKE_CURRENT_LIST_DIR}/src/include/pg_config_ext.h)
configure_file(${CMAKE_CURRENT_LIST_DIR}/src/include/port/win32.h ${CMAKE_CURRENT_LIST_DIR}/src/include/pg_config_os.h)
Expand Down Expand Up @@ -61,11 +62,14 @@ set(pg_libpq_catalog_interface
src/include/catalog/genbki.h
)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_DEBUG_POSTFIX "d")
set(CMAKE_INCLUDE_CURRENT_DIR ON)
add_library(libpq ${pg_port_src} ${pg_backend_src} ${pg_libpq_src})
target_compile_definitions(libpq PRIVATE -DFRONTEND -DENABLE_THREAD_SAFETY -DUSE_OPENSSL -D_CRT_SECURE_NO_WARNINGS)
target_link_libraries(libpq PRIVATE OpenSSL::SSL ws2_32 secur32 advapi32 shell32)
target_include_directories(libpq PRIVATE src/include src/include/port/win32 src/include/port/win32_msvc src/port)
set_target_properties(libpq PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON)

install(TARGETS libpq
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
Expand Down
3 changes: 2 additions & 1 deletion ports/libpq/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ file(COPY ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/lib
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libpq/COPYRIGHT ${CURRENT_PACKAGES_DIR}/share/libpq/copyright)


vcpkg_copy_pdbs()

vcpkg_copy_pdbs()
2 changes: 1 addition & 1 deletion ports/qt5/CONTROL
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Source: qt5
Version: 5.7-1
Build-Depends:
Description: Qt5 application framework main components. Webengine, examples and tests not included.
Build-Depends: sqlite3, libpq
10 changes: 8 additions & 2 deletions ports/qt5/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY)
get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY)
get_filename_component(JOM_EXE_PATH ${JOM} DIRECTORY)
set(ENV{PATH} "${JOM_EXE_PATH};${PYTHON3_EXE_PATH};${PERL_EXE_PATH};$ENV{PATH}")

set(ENV{INCLUDE} "${CURRENT_INSTALLED_DIR}/include;$ENV{INCLUDE}")
set(ENV{LIB} "${CURRENT_INSTALLED_DIR}/lib;$ENV{LIB}")
vcpkg_download_distfile(ARCHIVE_FILE
URLS "http://download.qt.io/official_releases/qt/5.7/5.7.0/single/qt-everywhere-opensource-src-5.7.0.7z"
FILENAME "qt-5.7.0.7z"
Expand Down Expand Up @@ -44,7 +45,11 @@ vcpkg_execute_required_process(
COMMAND "${SOURCE_PATH}/configure.bat"
-confirm-license -opensource -platform win32-msvc2015
-debug-and-release -force-debug-info ${QT_RUNTIME_LINKAGE}
-qt-zlib
-qt-libjpeg
-system-sqlite
-nomake examples -nomake tests -skip webengine
-qt-sql-sqlite -qt-sql-psql
-prefix ${CURRENT_PACKAGES_DIR}
-bindir ${CURRENT_PACKAGES_DIR}/bin
-hostbindir ${CURRENT_PACKAGES_DIR}/tools
Expand All @@ -67,7 +72,7 @@ message(STATUS "Build ${TARGET_TRIPLET} done")

message(STATUS "Installing ${TARGET_TRIPLET}")
vcpkg_execute_required_process(
COMMAND ${JOM} install
COMMAND ${JOM} -j1 install
WORKING_DIRECTORY ${OUTPUT_PATH}
LOGNAME install-${TARGET_TRIPLET}
)
Expand Down Expand Up @@ -151,3 +156,4 @@ vcpkg_execute_required_process(
file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/qt5 RENAME copyright)

vcpkg_copy_pdbs()

0 comments on commit 67303f1

Please sign in to comment.