Skip to content

Commit

Permalink
Adjust ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
mattdawkins committed Aug 19, 2023
1 parent ff35a91 commit f8c642c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 20 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -790,10 +790,6 @@ if( VIAME_BUILD_DEPENDENCIES )
include( add_project_python_deps )
endif()

if( WIN32 AND VIAME_ENABLE_POSTGRESQL )
include( add_project_postgres )
endif()

# Add optional projects dependend on by other projects
if( VIAME_ENABLE_DARKNET )
include( add_project_darknet )
Expand All @@ -813,6 +809,10 @@ if( VIAME_BUILD_DEPENDENCIES )
endif()

# Add other optional libraries
if( VIAME_ENABLE_POSTGRESQL )
include( add_project_postgres )
endif()

if( VIAME_ENABLE_SCALLOP_TK )
include( add_project_scallop_tk )
endif()
Expand Down
35 changes: 19 additions & 16 deletions cmake/add_project_postgres.cmake
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
include( ExternalProject )
# Postgres is provided via fletch for only linux but not windows
if( WIN32 )
include( ExternalProject )

set( VIAME_POSTGRES_URL https://data.kitware.com/api/v1/item/5ba55cd58d777f06b900d726/download )
set( VIAME_POSTGRES_MD5 7648e722fda0fcc47c96ef8093a369be )
set( VIAME_POSTGRES_FILENAME postgresql-9.5.1-1-windows-x64-binaries.zip )
set( VIAME_POSTGRES_URL https://data.kitware.com/api/v1/item/5ba55cd58d777f06b900d726/download )
set( VIAME_POSTGRES_MD5 7648e722fda0fcc47c96ef8093a369be )
set( VIAME_POSTGRES_FILENAME postgresql-9.5.1-1-windows-x64-binaries.zip )

set( VIAME_POSTGRES_DIR ${VIAME_BUILD_PREFIX}/src/postgres )
set( VIAME_POSTGRES_DIR ${VIAME_BUILD_PREFIX}/src/postgres )

ExternalProject_Add( postgres
DEPENDS kwiver
URL ${VIAME_POSTGRES_URL}
URL_MD5 ${VIAME_POSTGRES_MD5}
DOWNLOAD_DIR ${VIAME_DOWNLOAD_DIR}
DOWNLOAD_NAME ${VIAME_POSTGRES_FILENAME}
PREFIX ${VIAME_BUILD_PREFIX}
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory ${VIAME_POSTGRES_DIR}/bin ${VIAME_BUILD_INSTALL_PREFIX}/bin
ExternalProject_Add( postgres
DEPENDS kwiver
URL ${VIAME_POSTGRES_URL}
URL_MD5 ${VIAME_POSTGRES_MD5}
DOWNLOAD_DIR ${VIAME_DOWNLOAD_DIR}
DOWNLOAD_NAME ${VIAME_POSTGRES_FILENAME}
PREFIX ${VIAME_BUILD_PREFIX}
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory ${VIAME_POSTGRES_DIR}/bin ${VIAME_BUILD_INSTALL_PREFIX}/bin
COMMAND ${CMAKE_COMMAND} -E copy_directory ${VIAME_POSTGRES_DIR}/lib ${VIAME_BUILD_INSTALL_PREFIX}/lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${VIAME_POSTGRES_DIR}/share ${VIAME_BUILD_INSTALL_PREFIX}/share
)
)
endif()

0 comments on commit f8c642c

Please sign in to comment.