Skip to content

Commit

Permalink
Reformat.
Browse files Browse the repository at this point in the history
  • Loading branch information
jtv committed Jan 19, 2020
1 parent 0a81c98 commit 9a4e5c8
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 13 deletions.
21 changes: 14 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ string(STRIP ${VER_FILE_CONTENT} VER_FILE_CONTENT)
project(
libpqxx
VERSION ${VER_FILE_CONTENT}
LANGUAGES CXX)
LANGUAGES CXX
)

if(NOT "${CMAKE_CXX_STANDARD}")
set(CMAKE_CXX_STANDARD 17)
Expand Down Expand Up @@ -38,21 +39,27 @@ endif()
write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/libpqxx-config-version.cmake"
VERSION ${PROJECT_VERSION}
COMPATIBILITY SameMajorVersion)
COMPATIBILITY SameMajorVersion
)
install(FILES cmake/libpqxx-config.cmake
"${CMAKE_CURRENT_BINARY_DIR}/libpqxx-config-version.cmake"
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libpqxx)
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libpqxx
)
install(
EXPORT libpqxx-targets
NAMESPACE libpqxx::
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libpqxx)
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libpqxx
)
# Build tree export
export(
EXPORT libpqxx-targets
NAMESPACE libpqxx::
FILE ${CMAKE_CURRENT_BINARY_DIR}/libpqxx-targets.cmake)
configure_file(cmake/libpqxx-config.cmake
${CMAKE_CURRENT_BINARY_DIR}/libpqxx-config.cmake COPYONLY)
FILE ${CMAKE_CURRENT_BINARY_DIR}/libpqxx-targets.cmake
)
configure_file(
cmake/libpqxx-config.cmake ${CMAKE_CURRENT_BINARY_DIR}/libpqxx-config.cmake
COPYONLY
)
# Package generation
set(CPACK_GENERATOR TGZ)
set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
Expand Down
4 changes: 2 additions & 2 deletions include/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
################################################################################
# ##############################################################################
# AUTOMATICALLY GENERATED FILE -- DO NOT EDIT.
#
# This file is generated automatically by libpqxx's template2mak.py script, and
Expand All @@ -10,7 +10,7 @@
# libpqxx source archive.
#
# Generated from template './include/CMakeLists.txt.template'.
################################################################################
# ##############################################################################
install(
DIRECTORY pqxx "${PROJECT_BINARY_DIR}/include/pqxx"
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
Expand Down
4 changes: 2 additions & 2 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
################################################################################
# ##############################################################################
# AUTOMATICALLY GENERATED FILE -- DO NOT EDIT.
#
# This file is generated automatically by libpqxx's template2mak.py script, and
Expand All @@ -10,7 +10,7 @@
# libpqxx source archive.
#
# Generated from template './test/CMakeLists.txt.template'.
################################################################################
# ##############################################################################
enable_testing()

file(
Expand Down
4 changes: 2 additions & 2 deletions test/unit/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
################################################################################
# ##############################################################################
# AUTOMATICALLY GENERATED FILE -- DO NOT EDIT.
#
# This file is generated automatically by libpqxx's template2mak.py script, and
Expand All @@ -10,7 +10,7 @@
# libpqxx source archive.
#
# Generated from template './test/unit/CMakeLists.txt.template'.
################################################################################
# ##############################################################################
if(NOT PostgreSQL_INCLUDE_DIRS)
find_package(PostgreSQL REQUIRED)
endif()
Expand Down

0 comments on commit 9a4e5c8

Please sign in to comment.