[Greater-commits] r3729 - in branches/3.0.0-usf/GREAT-ER-DB: . impl/postgresql
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Jul 28 10:39:02 CEST 2011
Author: aheinecke
Date: 2011-07-28 10:38:59 +0200 (Thu, 28 Jul 2011)
New Revision: 3729
Added:
branches/3.0.0-usf/GREAT-ER-DB/impl/postgresql/CMakeLists.txt
Removed:
branches/3.0.0-usf/GREAT-ER-DB/CMakeLists.txt
Log:
CMakelists in the topleve directory comes later
Deleted: branches/3.0.0-usf/GREAT-ER-DB/CMakeLists.txt
===================================================================
--- branches/3.0.0-usf/GREAT-ER-DB/CMakeLists.txt 2011-07-28 08:36:50 UTC (rev 3728)
+++ branches/3.0.0-usf/GREAT-ER-DB/CMakeLists.txt 2011-07-28 08:38:59 UTC (rev 3729)
@@ -1,147 +0,0 @@
-# CMakeLists.txt
-#
-# Description: cmake file for python database bindings for GREAT-ER
-#
-# Authors:
-# Andre Heinecke <aheinecke at intevation.de>
-# Björn Ricks <bjoern.ricks at intevation.de>
-#
-# Copyright:
-# Copyright (C) 2011 by Intevation GmbH
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2,
-# or, at your option, any later version as published by the Free
-# Software Foundation
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
-project(dagreater_pg)
-
-cmake_minimum_required(VERSION 2.6)
-
-list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
-
-set(CMAKE_PYDAGREATER_VERSION_MAJOR 1)
-set(CMAKE_PYDAGREATER_VERSION_MINOR 9)
-set(CMAKE_PYDAGREATER_VERSION_PATCH 0)
-set(CMAKE_PYDAGREATER_VERSION_STRING "${CMAKE_PYDAGREATER_VERSION_MAJOR}.${CMAKE_PYDAGREATER_VERSION_MINOR}.${CMAKE_PYDAGREATER_VERSION_PATCH}")
-
-option(PYDAGERATER_ENABLE_TESTS "Enable tests" OFF)
-option(PYDAGREATER_DEBUG "Add debug output" OFF)
-
-if (PYDAGREATER_ENABLE_TESTS)
- message(STATUS "Testing is not yet implemented from cmake")
- add_subdirectory(tests)
-endif (PYDAGREATER_ENABLE_TESTS)
-
-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(PYDAGREATER_INSTALL_PATH "python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/GreaterDB")
-
-if (MSVC)
- add_definitions(-D_CRT_SECURE_NO_WARNINGS)
- add_definitions(/we4700)
-endif()
-
-set(DEBUG_ARG "")
-
-if (PYDAGREATER_DEBUG)
- set(CMAKE_BUILD_TYPE "RelWithDebInfo")
- set(DEBUG_ARG "--debug")
-endif()
-
-include_directories(${CMAKE_CURRENT_BINARY_DIR} ${DAGREATER_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS})
-
-set(pydagreater_SRCS
- ${CMAKE_CURRENT_BINARY_DIR}/dagreater/_dagreater_pg.c
-)
-
-set(PYDAGREATER_SOURCE_FILES
- ${CMAKE_SOURCE_DIR}/GreaterDB/dssfiledb.py
- ${CMAKE_SOURCE_DIR}/GreaterDB/__init__.py
- ${CMAKE_SOURCE_DIR}/GreaterDB/interface.py
- )
-
-set(PYDAGREATER_FILES
- ${PYDAGREATER_SOURCE_FILES}
- ${CMAKE_SOURCE_DIR}/GreaterDB/dssfiledb.pyc
- ${CMAKE_SOURCE_DIR}/GreaterDB/__init__.pyc
- ${CMAKE_SOURCE_DIR}/GreaterDB/interface.pyc
- )
-
-set(PYDAGREATER_GENERATOR_FILES
- ${CMAKE_SOURCE_DIR}/generator/WrapperGenerator/typesystem.py
- ${CMAKE_SOURCE_DIR}/generator/WrapperGenerator/cmodule.py
- ${CMAKE_SOURCE_DIR}/generator/WrapperGenerator/functions.py
- ${CMAKE_SOURCE_DIR}/generator/GreaterAPIGenerator/cfiles.py
- ${CMAKE_SOURCE_DIR}/generator/GreaterAPIGenerator/dbfunctions.py
- ${CMAKE_SOURCE_DIR}/generator/GreaterAPIGenerator/greatertypes.py
- ${CMAKE_SOURCE_DIR}/generator/GreaterAPIGenerator/main.py
- ${CMAKE_SOURCE_DIR}/generator/GreaterAPIGenerator/pyfiles.py
- ${CMAKE_SOURCE_DIR}/generator/GreaterAPIGenerator/helper.py
- )
-
-install(FILES
- ${CMAKE_CURRENT_BINARY_DIR}/dagreater/pydagreater.py
- ${PYDAGREATER_FILES}
- DESTINATION lib/${PYDAGREATER_INSTALL_PATH}
-)
-
-ADD_CUSTOM_COMMAND(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/dagreater/_dagreater_pg.c
- ${CMAKE_CURRENT_BINARY_DIR}/dagreater/pydagreater.py
- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/generatewrapper.py ${DEBUG_ARG}
- -o ${CMAKE_CURRENT_BINARY_DIR}/dagreater
- -i ${CMAKE_SOURCE_DIR}/dagreater
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dagreater/apispec.py ${CMAKE_SOURCE_DIR}/generatewrapper.py
- ${PYDAGREATER_GENERATOR_FILES}
-)
-
-macro(python_compile PYTHON_FILE)
- string(REPLACE ".py" ".pyc" PYTHON_COMPILED_FILE "${PYTHON_FILE}")
- get_filename_component(_target ${PYTHON_COMPILED_FILE} NAME)
- add_custom_target( ${_target} ALL
- COMMAND ${PYTHON_EXECUTABLE} -m py_compile
- ${PYTHON_FILE}
- COMMENT "Compiling ${PYTHON_FILE}"
- SOURCES ${PYTHON_FILE}
- )
-endmacro(python_compile)
-
-foreach(_PYTHON_FILE ${PYDAGREATER_SOURCE_FILES})
- message(STATUS "Compiling ${_PYTHON_FILE}")
- python_compile(${_PYTHON_FILE})
-endforeach(_PYTHON_FILE)
-
-add_library(pydagreater MODULE ${pydagreater_SRCS})
-target_link_libraries(pydagreater ${DAGREATER_LIBRARIES}
- ${PYTHON_LIBRARIES})
-
-set_target_properties(pydagreater PROPERTIES PREFIX ""
- OUTPUT_NAME _dagreater_pg)
-if(WIN32 AND NOT CYGWIN)
- set_target_properties(pydagreater PROPERTIES
- SUFFIX .pyd
- LINK_FLAGS /EXPORT:init_dagreater_pg
- )
-ENDIF()
-
-
-install(TARGETS pydagreater ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}
- LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/${PYDAGREATER_INSTALL_PATH})
Added: branches/3.0.0-usf/GREAT-ER-DB/impl/postgresql/CMakeLists.txt
===================================================================
--- branches/3.0.0-usf/GREAT-ER-DB/impl/postgresql/CMakeLists.txt 2011-07-28 08:36:50 UTC (rev 3728)
+++ branches/3.0.0-usf/GREAT-ER-DB/impl/postgresql/CMakeLists.txt 2011-07-28 08:38:59 UTC (rev 3729)
@@ -0,0 +1,192 @@
+# CMakeLists.txt
+#
+# Description: cmake file for dagreater_pg psql database bindings for GREAT-ER
+#
+# Authors:
+# Andre Heinecke <aheinecke at intevation.de>
+#
+# Copyright:
+# Copyright (C) 2011 by Intevation GmbH
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2,
+# or, at your option, any later version as published by the Free
+# Software Foundation
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+
+project(dagreater_pg)
+
+cmake_minimum_required(VERSION 2.6)
+
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
+
+set(CMAKE_DAGREATER_PG_VERSION_MAJOR 1)
+set(CMAKE_DAGREATER_PG_VERSION_MINOR 9)
+set(CMAKE_DAGREATER_PG_VERSION_PATCH 0)
+set(CMAKE_DAGREATER_PG_VERSION_STRING "${CMAKE_DAGREATER_PG_VERSION_MAJOR}.${CMAKE_DAGREATER_PG_VERSION_MINOR}.${CMAKE_DAGREATER_PG_VERSION_PATCH}")
+
+option(DAGERATER_ENABLE_TESTS "Enable tests")
+if (DAGREATER_ENABLE_TESTS)
+ message(STATUS "Testing is not yet implemented from cmake")
+ add_subdirectory(tests)
+endif (DAGREATER_ENABLE_TESTS)
+
+find_package(Postgresql REQUIRED)
+find_program(ECPG_EXECUTABLE ecpg REQUIRED)
+
+if (NOT ECPG_EXECUTABLE)
+ message(ERROR "Embedded psql precompiler not found!")
+endif()
+
+include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ${POSTGRESQL_INCLUDE_DIR})
+set(dagreater_pg_SRCS
+ dagreater_pg.c
+ gdagreater_pg.c
+ daexplib_pg.h
+ dagreater_pg.h
+ gdaexplib_pg.h
+)
+
+install(FILES
+ daexplib_pg.h
+ dagreater_pg.h
+ gdaexplib_pg.h
+ DESTINATION include/dagreater COMPONENT Devel
+)
+
+ADD_CUSTOM_COMMAND(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/dagreater_pg.c
+ COMMAND ${ECPG_EXECUTABLE} -o ${CMAKE_CURRENT_BINARY_DIR}/dagreater_pg.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/dagreater_pg.pgc
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dagreater_pg.pgc
+)
+ADD_CUSTOM_COMMAND(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/gdagreater_pg.c
+ COMMAND ${ECPG_EXECUTABLE} -o ${CMAKE_CURRENT_BINARY_DIR}/gdagreater_pg.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/gdagreater_pg.pgc
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/gdagreater_pg.pgc
+)
+
+add_library(dagreater_pg SHARED ${dagreater_pg_SRCS})
+
+set_target_properties(dagreater_pg PROPERTIES
+ VERSION ${CMAKE_DAGREATER_PG_VERSION_STRING}
+ SOVERSION ${CMAKE_DAGREATER_PG_VERSION_MAJOR}
+ LINK_INTERFACE_LIBRARIES ""
+ DEFINE_SYMBOL DAGREATER_PG_MAKEDLL
+)
+
+install(TARGETS dagreater_pg DESTINATION ${CMAKE_INSTALL_PREFIX}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
+
+# CMakeLists.txt
+#
+# Description: cmake file for dagreater_pg psql database bindings for GREAT-ER
+#
+# Authors:
+# Andre Heinecke <aheinecke at intevation.de>
+#
+# Copyright:
+# Copyright (C) 2011 by Intevation GmbH
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2,
+# or, at your option, any later version as published by the Free
+# Software Foundation
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+
+project(dagreater_pg)
+
+cmake_minimum_required(VERSION 2.6)
+
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
+
+set(CMAKE_DAGREATER_PG_VERSION_MAJOR 1)
+set(CMAKE_DAGREATER_PG_VERSION_MINOR 9)
+set(CMAKE_DAGREATER_PG_VERSION_PATCH 0)
+set(CMAKE_DAGREATER_PG_VERSION_STRING "${CMAKE_DAGREATER_PG_VERSION_MAJOR}.${CMAKE_DAGREATER_PG_VERSION_MINOR}.${CMAKE_DAGREATER_PG_VERSION_PATCH}")
+
+option(DAGERATER_ENABLE_TESTS "Enable tests" OFF)
+option(DAGREATER_DEBUG "Add debug output" OFF)
+
+if (DAGREATER_ENABLE_TESTS)
+ message(STATUS "Testing is not yet implemented from cmake")
+ add_subdirectory(tests)
+endif (DAGREATER_ENABLE_TESTS)
+
+find_package(Postgresql REQUIRED)
+find_package(PythonLibs)
+find_program(ECPG_EXECUTABLE ecpg REQUIRED)
+
+if (NOT ECPG_EXECUTABLE)
+ message(ERROR "Embedded psql precompiler not found!")
+endif()
+
+if (MSVC)
+ add_definitions(-D_CRT_SECURE_NO_WARNINGS)
+ add_definitions(/we4700)
+endif()
+
+if (DAGREATER_DEBUG)
+ add_definitions(-DDEBUG_MODE_ON=1)
+endif()
+
+include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${POSTGRESQL_INCLUDE_DIR})
+set(dagreater_pg_SRCS
+ dagreater_pg.c
+ gdagreater_pg.c
+ daexplib_pg.h
+ dagreater_pg.h
+ gdaexplib_pg.h
+)
+
+install(FILES
+ daexplib_pg.h
+ dagreater_pg.h
+ datypes_pg.h
+ gdaexplib_pg.h
+ DESTINATION include/dagreater COMPONENT Devel
+)
+
+ADD_CUSTOM_COMMAND(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/dagreater_pg.c
+ COMMAND ${ECPG_EXECUTABLE} -o ${CMAKE_CURRENT_BINARY_DIR}/dagreater_pg.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/dagreater_pg.pgc
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dagreater_pg.pgc
+)
+ADD_CUSTOM_COMMAND(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/gdagreater_pg.c
+ COMMAND ${ECPG_EXECUTABLE} -o ${CMAKE_CURRENT_BINARY_DIR}/gdagreater_pg.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/gdagreater_pg.pgc
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/gdagreater_pg.pgc
+)
+
+add_library(dagreater_pg SHARED ${dagreater_pg_SRCS})
+target_link_libraries(dagreater_pg ${POSTGRESQL_LIBRARIES} ${ECPG_LIBRARIES})
+set_target_properties(dagreater_pg PROPERTIES
+ VERSION ${CMAKE_DAGREATER_PG_VERSION_STRING}
+ SOVERSION ${CMAKE_DAGREATER_PG_VERSION_MAJOR}
+ LINK_INTERFACE_LIBRARIES ""
+ DEFINE_SYMBOL DAGREATER_PG_MAKEDLL
+)
+
+install(TARGETS dagreater_pg ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
+ RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
More information about the Greater-commits
mailing list