|
Removed
Link Here
|
| 1 |
--- CMakeLists.txt.orig 2015-07-03 09:22:49 UTC |
| 2 |
+++ CMakeLists.txt |
| 3 |
@@ -32,6 +32,7 @@ set(USE_SYSTEM_JSONCPP ON CACHE BOOL "Us |
| 4 |
set(USE_SYSTEM_BOOST ON CACHE BOOL "Use the system version of Boost") |
| 5 |
set(USE_SYSTEM_GOOGLE_TEST ON CACHE BOOL "Use the system version of Google Test") |
| 6 |
set(USE_SYSTEM_LIBPQ ON CACHE BOOL "Use the system version of the PostgreSQL client library") |
| 7 |
+set(BUILD_UNIT_TESTS ON CACHE BOOL "Build UnitTests") |
| 8 |
|
| 9 |
# Distribution-specific settings |
| 10 |
set(USE_GTEST_DEBIAN_SOURCE_PACKAGE OFF CACHE BOOL "Use the sources of Google Test shipped with libgtest-dev (Debian only)") |
| 11 |
@@ -47,7 +48,10 @@ include(${CMAKE_SOURCE_DIR}/Resources/CM |
| 12 |
include(${CMAKE_SOURCE_DIR}/Resources/CMake/BoostConfiguration.cmake) |
| 13 |
include(${CMAKE_SOURCE_DIR}/Resources/CMake/PostgreSQLConfiguration.cmake) |
| 14 |
include(${CMAKE_SOURCE_DIR}/Resources/CMake/JsonCppConfiguration.cmake) |
| 15 |
-include(${CMAKE_SOURCE_DIR}/Resources/CMake/GoogleTestConfiguration.cmake) |
| 16 |
+ |
| 17 |
+if (BUILD_UNIT_TESTS) |
| 18 |
+ include(${CMAKE_SOURCE_DIR}/Resources/CMake/GoogleTestConfiguration.cmake) |
| 19 |
+endif() |
| 20 |
|
| 21 |
|
| 22 |
# Check that the Orthanc SDK headers are available or download them |
| 23 |
@@ -123,14 +127,21 @@ set_target_properties(OrthancPostgreSQLI |
| 24 |
SOVERSION ${ORTHANC_POSTGRESQL_VERSION} |
| 25 |
) |
| 26 |
|
| 27 |
+install( |
| 28 |
+ TARGETS OrthancPostgreSQLStorage OrthancPostgreSQLIndex |
| 29 |
+ RUNTIME DESTINATION lib # Destination for Windows |
| 30 |
+ LIBRARY DESTINATION share/orthanc/plugins # Destination for Linux |
| 31 |
+) |
| 32 |
|
| 33 |
-add_executable(UnitTests |
| 34 |
- ${CORE_SOURCES} |
| 35 |
- ${GTEST_SOURCES} |
| 36 |
- ${AUTOGENERATED_SOURCES} |
| 37 |
- ${CMAKE_SOURCE_DIR}/IndexPlugin/PostgreSQLWrapper.cpp |
| 38 |
- ${CMAKE_SOURCE_DIR}/StoragePlugin/PostgreSQLStorageArea.cpp |
| 39 |
- ${CMAKE_SOURCE_DIR}/UnitTestsSources/UnitTestsMain.cpp |
| 40 |
- ${CMAKE_SOURCE_DIR}/UnitTestsSources/PostgreSQLTests.cpp |
| 41 |
- ${CMAKE_SOURCE_DIR}/UnitTestsSources/PostgreSQLWrapperTests.cpp |
| 42 |
- ) |
| 43 |
+if (BUILD_UNIT_TESTS) |
| 44 |
+ add_executable(UnitTests |
| 45 |
+ ${CORE_SOURCES} |
| 46 |
+ ${GTEST_SOURCES} |
| 47 |
+ ${AUTOGENERATED_SOURCES} |
| 48 |
+ ${CMAKE_SOURCE_DIR}/IndexPlugin/PostgreSQLWrapper.cpp |
| 49 |
+ ${CMAKE_SOURCE_DIR}/StoragePlugin/PostgreSQLStorageArea.cpp |
| 50 |
+ ${CMAKE_SOURCE_DIR}/UnitTestsSources/UnitTestsMain.cpp |
| 51 |
+ ${CMAKE_SOURCE_DIR}/UnitTestsSources/PostgreSQLTests.cpp |
| 52 |
+ ${CMAKE_SOURCE_DIR}/UnitTestsSources/PostgreSQLWrapperTests.cpp |
| 53 |
+ ) |
| 54 |
+endif() |