summaryrefslogtreecommitdiffstats
path: root/src/svnqt
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-11-26 20:37:40 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-11-26 20:37:40 -0600
commita9fbdbd29b32151d366123ca637b2a06736d6e05 (patch)
tree9e86b48f7f6e776dcd9a1edea7705bfc93fd4a8d /src/svnqt
parent094b95b8a8d3d52ea4ce9035f8246dcdf054c7f5 (diff)
downloadtdesvn-a9fbdbd29b32151d366123ca637b2a06736d6e05.tar.gz
tdesvn-a9fbdbd29b32151d366123ca637b2a06736d6e05.zip
Initial attempt at using the standard CMake system
Diffstat (limited to 'src/svnqt')
-rw-r--r--src/svnqt/CMakeLists.txt42
-rw-r--r--src/svnqt/CMakeLists.txt.orig171
-rw-r--r--src/svnqt/ConfigureChecks.cmake30
-rw-r--r--src/svnqt/config.h.cmake5
4 files changed, 210 insertions, 38 deletions
diff --git a/src/svnqt/CMakeLists.txt b/src/svnqt/CMakeLists.txt
index a6212fd..d8fd1a0 100644
--- a/src/svnqt/CMakeLists.txt
+++ b/src/svnqt/CMakeLists.txt
@@ -45,7 +45,6 @@ SET(SOURCES
cache/DatabaseException.cpp
)
-IF (NOT QT4_FOUND)
IF (SQLITE_FOUND)
MESSAGE(STATUS "Build own sqlite3 database modul")
SET(SOURCES
@@ -58,10 +57,6 @@ IF (NOT QT4_FOUND)
ELSE (SQLITE_FOUND)
MESSAGE(SEND_ERROR "The QT3 version requires sqlite3 but could not found")
ENDIF (SQLITE_FOUND)
-ELSE (NOT QT4_FOUND)
- MESSAGE(STATUS "Build with QT4.")
- ADD_DEFINITIONS(-DNO_SQLITE3)
-ENDIF (NOT QT4_FOUND)
SET(CACHEINST_HEADERS
cache/LogCache.hpp
@@ -108,19 +103,7 @@ SET(INST_HEADERS
FILE(GLOB svnhdr RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.hpp")
SET(svnhdr ${svnhdr} ${CACHE_INST_HEADERS})
-#IF(QT4_FOUND)
-# MESSAGE(STATUS "Qt: ${QT_LIBRARY_DIR}")
-# MESSAGE(STATUS "Qt: ${QT_QTCORE_LIBRARY}")
-# SET(TOUTF8 "toUtf8")
-# SET(FROMUTF8 "fromUtf8")
-# SET(QLIST "QList")
-# SET(TOASCII "toAscii")
-# SET(HOMEDIR "homePath")
-# SET(svnqt-name svnqt-qt4)
-# SET(QDATABASE "QSqlDatabase")
-# SET(QLONG "qlonglong")
-#ELSE(QT4_FOUND)
-# IF(QT_FOUND)
+
SET(TOUTF8 "utf8")
SET(FROMUTF8 "fromUtf8")
SET(QLIST "TQValueList")
@@ -128,17 +111,12 @@ SET(svnhdr ${svnhdr} ${CACHE_INST_HEADERS})
SET(HOMEDIR "homeDirPath")
SET(QDATABASE "TQSqlDatabase*")
SET(QLONG "Q_LLONG")
-# ENDIF(QT_FOUND)
SET(svnqt-name svnqt)
-#ENDIF(QT4_FOUND)
IF (HAVE_GCC_VISIBILITY)
SET(_SVNQT_EXPORT "__attribute__ ((visibility(\"default\")))")
SET(_SVNQT_NOEXPORT "__attribute__ ((visibility(\"hidden\")))")
ENDIF (HAVE_GCC_VISIBILITY)
-IF (WIN32)
- SET(_SVNQT_EXPORT "__declspec(dllexport)")
-ENDIF (WIN32)
CONFIGURE_FILE(
"${CMAKE_CURRENT_SOURCE_DIR}/svnqt_defines.hpp.in"
@@ -150,14 +128,10 @@ SET(INST_HEADERS ${INST_HEADERS} ${CMAKE_CURRENT_BINARY_DIR}/svnqt_defines.hpp)
INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
ADD_LIBRARY(${svnqt-name} SHARED ${SOURCES} ${svnhdr})
-IF(WIN32)
- ADD_DEFINITIONS(-D_USE_32BIT_TIME_T)
-ELSE(WIN32)
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib${LIB_SUFFIX})
SET_TARGET_PROPERTIES(${svnqt-name}
PROPERTIES
COMPILE_FLAGS ${CMAKE_SHARED_LIBRARY_CXX_FLAGS})
-ENDIF(WIN32)
SET(LIB_MAJOR 4)
SET(LIB_MINOR 2)
@@ -174,16 +148,12 @@ SET(ALL_LINKFLAGS "${ALL_LINKFLAGS} ${APU_EXTRA_LIBFLAGS}")
SET_TARGET_PROPERTIES(${svnqt-name} PROPERTIES LINK_FLAGS "${ALL_LINKFLAGS} ${LINK_NO_UNDEFINED}")
TARGET_LINK_LIBRARIES(${svnqt-name} ${QT_LIBRARIES} ${SUBVERSION_ALL_LIBS})
-IF (SQLITE_FOUND AND NOT QT4_FOUND)
+IF (SQLITE_FOUND)
TARGET_LINK_LIBRARIES(${svnqt-name} ${SQLITE_LIBRARIES})
INCLUDE_DIRECTORIES(SQLITE_INCLUDE_DIR)
-ELSE (SQLITE_FOUND AND NOT QT4_FOUND)
+ELSE (SQLITE_FOUND)
TARGET_LINK_LIBRARIES(${svnqt-name} ${QT_QTSQL_LIBRARY})
-ENDIF (SQLITE_FOUND AND NOT QT4_FOUND)
-
-IF (WIN32)
- TARGET_LINK_LIBRARIES( ${svnqt-name} wsock32.lib )
-ENDIF (WIN32)
+ENDIF (SQLITE_FOUND)
# Just a small linking test
IF (BUILD_TESTS)
@@ -191,13 +161,9 @@ IF (BUILD_TESTS)
TARGET_LINK_LIBRARIES(testlink ${svnqt-name})
ENDIF (BUILD_TESTS)
-# install rules
-# in win32 we don't install it
-IF(NOT WIN32)
INSTALL(TARGETS ${svnqt-name} DESTINATION ${LIB_INSTALL_DIR})
INSTALL(FILES ${INST_HEADERS} DESTINATION include/${svnqt-name})
INSTALL(FILES ${CACHEINST_HEADERS} DESTINATION include/${svnqt-name}/cache)
-ENDIF(NOT WIN32)
IF (BUILD_TESTS)
ADD_SUBDIRECTORY(tests)
diff --git a/src/svnqt/CMakeLists.txt.orig b/src/svnqt/CMakeLists.txt.orig
new file mode 100644
index 0000000..d8fd1a0
--- /dev/null
+++ b/src/svnqt/CMakeLists.txt.orig
@@ -0,0 +1,171 @@
+SET(SOURCES
+ apr.cpp
+ client_annotate.cpp
+ client_cat.cpp
+ client.cpp
+ client_diff.cpp
+ client_ls.cpp
+ client_modify.cpp
+ client_property.cpp
+ client_status.cpp
+ context.cpp
+ datetime.cpp
+ dirent.cpp
+ entry.cpp
+ exception.cpp
+ log_entry.cpp
+ path.cpp
+ pool.cpp
+ revision.cpp
+ status.cpp
+ targets.cpp
+ url.cpp
+ version_check.cpp
+ wc.cpp
+ lock_entry.cpp
+ client_lock.cpp
+ info_entry.cpp
+ client_impl.cpp
+ contextdata.cpp
+ commititem.cpp
+ repository.cpp
+ repositorydata.cpp
+ repositorylistener.cpp
+ svnstream.cpp
+ diff_data.cpp
+ svnfilestream.cpp
+ stringarray.cpp
+ diffoptions.cpp
+ conflictdescription.cpp
+ conflictresult.cpp
+ client_merge.cpp
+ cache/LogCache.cpp
+ cache/ReposLog.cpp
+ cache/DatabaseException.hpp
+ cache/DatabaseException.cpp
+ )
+
+ IF (SQLITE_FOUND)
+ MESSAGE(STATUS "Build own sqlite3 database modul")
+ SET(SOURCES
+ ${SOURCES}
+ cache/sqlite3/qsqlcachedresult.cpp
+ cache/sqlite3/qsql_sqlite3.cpp
+ cache/sqlite3/qsqlcachedresult.h
+ cache/sqlite3/qsql_sqlite3.h
+ )
+ ELSE (SQLITE_FOUND)
+ MESSAGE(SEND_ERROR "The QT3 version requires sqlite3 but could not found")
+ ENDIF (SQLITE_FOUND)
+
+SET(CACHEINST_HEADERS
+ cache/LogCache.hpp
+ cache/ReposLog.hpp
+ cache/DatabaseException.hpp
+)
+
+SET(INST_HEADERS
+ annotate_line.hpp
+ apr.hpp
+ check.hpp
+ client.hpp
+ commititem.hpp
+ context.hpp
+ context_listener.hpp
+ datetime.hpp
+ dirent.hpp
+ entry.hpp
+ exception.hpp
+ info_entry.hpp
+ lock_entry.hpp
+ log_entry.hpp
+ path.hpp
+ pool.hpp
+ repository.hpp
+ repositorylistener.hpp
+ revision.hpp
+ smart_pointer.hpp
+ shared_pointer.hpp
+ status.hpp
+ svnfilestream.hpp
+ svnstream.hpp
+ svnqttypes.hpp
+ targets.hpp
+ url.hpp
+ version_check.hpp
+ wc.hpp
+ stringarray.hpp
+ diffoptions.hpp
+ conflictdescription.hpp
+ conflictresult.hpp
+ )
+
+FILE(GLOB svnhdr RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.hpp")
+SET(svnhdr ${svnhdr} ${CACHE_INST_HEADERS})
+
+
+ SET(TOUTF8 "utf8")
+ SET(FROMUTF8 "fromUtf8")
+ SET(QLIST "TQValueList")
+ SET(TOASCII "latin1")
+ SET(HOMEDIR "homeDirPath")
+ SET(QDATABASE "TQSqlDatabase*")
+ SET(QLONG "Q_LLONG")
+ SET(svnqt-name svnqt)
+
+IF (HAVE_GCC_VISIBILITY)
+ SET(_SVNQT_EXPORT "__attribute__ ((visibility(\"default\")))")
+ SET(_SVNQT_NOEXPORT "__attribute__ ((visibility(\"hidden\")))")
+ENDIF (HAVE_GCC_VISIBILITY)
+
+CONFIGURE_FILE(
+ "${CMAKE_CURRENT_SOURCE_DIR}/svnqt_defines.hpp.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/svnqt_defines.hpp"
+ IMMEDIATE
+ @ONLY)
+
+SET(INST_HEADERS ${INST_HEADERS} ${CMAKE_CURRENT_BINARY_DIR}/svnqt_defines.hpp)
+INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
+
+ADD_LIBRARY(${svnqt-name} SHARED ${SOURCES} ${svnhdr})
+ SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib${LIB_SUFFIX})
+ SET_TARGET_PROPERTIES(${svnqt-name}
+ PROPERTIES
+ COMPILE_FLAGS ${CMAKE_SHARED_LIBRARY_CXX_FLAGS})
+
+SET(LIB_MAJOR 4)
+SET(LIB_MINOR 2)
+SET(LIB_RELEASE 2)
+
+SET(_soversion ${LIB_MAJOR}.${LIB_MINOR}.${LIB_RELEASE})
+
+SET_TARGET_PROPERTIES(${svnqt-name} PROPERTIES
+ SOVERSION ${LIB_MAJOR}
+ VERSION ${_soversion})
+
+SET(ALL_LINKFLAGS ${APR_EXTRA_LIBFLAGS})
+SET(ALL_LINKFLAGS "${ALL_LINKFLAGS} ${APU_EXTRA_LIBFLAGS}")
+SET_TARGET_PROPERTIES(${svnqt-name} PROPERTIES LINK_FLAGS "${ALL_LINKFLAGS} ${LINK_NO_UNDEFINED}")
+TARGET_LINK_LIBRARIES(${svnqt-name} ${QT_LIBRARIES} ${SUBVERSION_ALL_LIBS})
+
+IF (SQLITE_FOUND)
+ TARGET_LINK_LIBRARIES(${svnqt-name} ${SQLITE_LIBRARIES})
+ INCLUDE_DIRECTORIES(SQLITE_INCLUDE_DIR)
+ELSE (SQLITE_FOUND)
+ TARGET_LINK_LIBRARIES(${svnqt-name} ${QT_QTSQL_LIBRARY})
+ENDIF (SQLITE_FOUND)
+
+# Just a small linking test
+IF (BUILD_TESTS)
+ ADD_EXECUTABLE(testlink testmain.cpp)
+ TARGET_LINK_LIBRARIES(testlink ${svnqt-name})
+ENDIF (BUILD_TESTS)
+
+ INSTALL(TARGETS ${svnqt-name} DESTINATION ${LIB_INSTALL_DIR})
+ INSTALL(FILES ${INST_HEADERS} DESTINATION include/${svnqt-name})
+ INSTALL(FILES ${CACHEINST_HEADERS} DESTINATION include/${svnqt-name}/cache)
+
+IF (BUILD_TESTS)
+ ADD_SUBDIRECTORY(tests)
+ ADD_SUBDIRECTORY(cache/test)
+ENDIF (BUILD_TESTS)
diff --git a/src/svnqt/ConfigureChecks.cmake b/src/svnqt/ConfigureChecks.cmake
new file mode 100644
index 0000000..16f316d
--- /dev/null
+++ b/src/svnqt/ConfigureChecks.cmake
@@ -0,0 +1,30 @@
+#################################################
+#
+# (C) 2011 Timothy Pearson
+# kb9vqf (AT) pearsoncomputing.net
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+if( BUILD_TRANSLATIONS AND NOT DEFINED MSGFMT_EXECUTABLE )
+ find_program( MSGFMT_EXECUTABLE msgfmt )
+ if( NOT MSGFMT_EXECUTABLE )
+ tde_message_fatal( "msgfmt program is required, but was not found on your system" )
+ endif( )
+endif( )
+
+check_type_size( "int" SIZEOF_INT BUILTIN_TYPES_ONLY )
+check_type_size( "long" SIZEOF_LONG BUILTIN_TYPES_ONLY )
+
+check_include_file( stdint.h HAVE_STDINT_H )
+check_include_file( systems.h HAVE_SYSTEMS_H )
+check_include_file( linux/inotify.h HAVE_INOTIFY )
+
+check_function_exists( statvfs HAVE_STATVFS )
+
+# common required stuff
+find_package( TQt )
+find_package( TDE )
diff --git a/src/svnqt/config.h.cmake b/src/svnqt/config.h.cmake
new file mode 100644
index 0000000..d81a482
--- /dev/null
+++ b/src/svnqt/config.h.cmake
@@ -0,0 +1,5 @@
+#cmakedefine SIZEOF_INT @SIZEOF_INT@
+#cmakedefine SIZEOF_LONG @SIZEOF_LONG@
+#cmakedefine HAVE_STDINT_H 1
+#cmakedefine HAVE_SYSTEMS_H 1
+#cmakedefine HAVE_STATVFS 1 \ No newline at end of file