[Greater-commits] r280 - trunk/GREAT-ER-DB
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Mon Jun 27 13:51:35 CEST 2011
Author: bricks
Date: 2011-06-27 13:51:35 +0200 (Mon, 27 Jun 2011)
New Revision: 280
Modified:
trunk/GREAT-ER-DB/CMakeLists.txt
Log:
include postgres impl if dagreater can't be found
Modified: trunk/GREAT-ER-DB/CMakeLists.txt
===================================================================
--- trunk/GREAT-ER-DB/CMakeLists.txt 2011-06-27 11:49:27 UTC (rev 279)
+++ trunk/GREAT-ER-DB/CMakeLists.txt 2011-06-27 11:51:35 UTC (rev 280)
@@ -42,12 +42,17 @@
add_subdirectory(tests)
endif (PYDAGREATER_ENABLE_TESTS)
-find_package(Dagreater REQUIRED)
+find_package(Dagreater)
find_package(PythonLibs 2.3 REQUIRED)
find_package(PythonInterp REQUIRED)
+if (NOT DAGREATER_FOUND)
+ add_subdirectory(${CMAKE_SOURCE_DIR}/impl/postgresql)
+ set(DAGREATER_LIBRARIES dagreater_pg)
+ set(DAGREATER_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/impl/postgresql)
+endif()
-set(DAGREATER_INSTALL_PATH "python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/GreaterDB")
+set(PYDAGREATER_INSTALL_PATH "python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/GreaterDB")
if (MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
@@ -67,14 +72,14 @@
${CMAKE_CURRENT_BINARY_DIR}/dagreater/_dagreater_pg.c
)
-set(DAGREATER_PYTHON_SOURCE_FILES
+set(PYDAGREATER_SOURCE_FILES
${CMAKE_SOURCE_DIR}/GreaterDB/dssfiledb.py
${CMAKE_SOURCE_DIR}/GreaterDB/__init__.py
${CMAKE_SOURCE_DIR}/GreaterDB/interface.py
)
-set(DAGREATER_PYTHON_FILES
- ${DAGREATER_PYTHON_SOURCE_FILES}
+set(PYDAGREATER_FILES
+ ${PYDAGREATER_SOURCE_FILES}
${CMAKE_SOURCE_DIR}/GreaterDB/dssfiledb.pyc
${CMAKE_SOURCE_DIR}/GreaterDB/__init__.pyc
${CMAKE_SOURCE_DIR}/GreaterDB/interface.pyc
@@ -82,8 +87,8 @@
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/dagreater/pydagreater.py
- ${DAGREATER_PYTHON_FILES}
- DESTINATION lib/${DAGREATER_INSTALL_PATH}
+ ${PYDAGREATER_FILES}
+ DESTINATION lib/${PYDAGREATER_INSTALL_PATH}
)
ADD_CUSTOM_COMMAND(
@@ -106,13 +111,12 @@
)
endmacro(python_compile)
-foreach(_PYTHON_FILE ${DAGREATER_PYTHON_SOURCE_FILES})
+foreach(_PYTHON_FILE ${PYDAGREATER_SOURCE_FILES})
message(STATUS "Compiling ${_PYTHON_FILE}")
python_compile(${_PYTHON_FILE})
endforeach(_PYTHON_FILE)
add_library(pydagreater MODULE ${pydagreater_SRCS})
-message(STATUS "pydagreater libs ${DAGREATER_LIBRARIES}")
target_link_libraries(pydagreater ${DAGREATER_LIBRARIES}
${PYTHON_LIBRARIES})
@@ -127,4 +131,4 @@
install(TARGETS pydagreater ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}
- LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/${DAGREATER_INSTALL_PATH})
+ LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/${PYDAGREATER_INSTALL_PATH})
More information about the Greater-commits
mailing list