mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-05-14 15:59:18 -05:00
cmake: initial version of cmake build system files
This commit is contained in:
@@ -0,0 +1,89 @@
|
||||
project(sqlitebrowser)
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
|
||||
|
||||
set(ANTLR_DIR libs/antlr-2.7.7)
|
||||
set(QHEXEDIT_DIR libs/qhexedit)
|
||||
|
||||
add_subdirectory(${ANTLR_DIR})
|
||||
add_subdirectory(${QHEXEDIT_DIR})
|
||||
|
||||
FIND_PACKAGE(Qt4 COMPONENTS QtCore QtGui REQUIRED)
|
||||
|
||||
include(${QT_USE_FILE})
|
||||
add_definitions(${QT_DEFINITIONS})
|
||||
|
||||
set(SQLB_HDR
|
||||
src/AboutDialog.h
|
||||
src/CreateIndexDialog.h
|
||||
src/EditDialog.h
|
||||
src/EditTableDialog.h
|
||||
src/ExportCsvDialog.h
|
||||
src/ExtendedTableWidget.h
|
||||
src/FilterTableHeader.h
|
||||
src/ImportCsvDialog.h
|
||||
src/MainWindow.h
|
||||
src/PreferencesDialog.h
|
||||
src/SQLiteSyntaxHighlighter.h
|
||||
src/SqlExecutionArea.h
|
||||
src/VacuumDialog.h
|
||||
src/gen_version.h
|
||||
src/sqlitedb.h
|
||||
src/sqlitetablemodel.h
|
||||
src/sqlitetypes.h
|
||||
src/sqltextedit.h
|
||||
)
|
||||
|
||||
set(SQLB_SRC
|
||||
src/AboutDialog.cpp
|
||||
src/CreateIndexDialog.cpp
|
||||
src/EditDialog.cpp
|
||||
src/EditTableDialog.cpp
|
||||
src/ExportCsvDialog.cpp
|
||||
src/ExtendedTableWidget.cpp
|
||||
src/FilterTableHeader.cpp
|
||||
src/ImportCsvDialog.cpp
|
||||
src/MainWindow.cpp
|
||||
src/PreferencesDialog.cpp
|
||||
src/SQLiteSyntaxHighlighter.cpp
|
||||
src/SqlExecutionArea.cpp
|
||||
src/VacuumDialog.cpp
|
||||
src/main.cpp
|
||||
src/sqlitedb.cpp
|
||||
src/sqlitetablemodel.cpp
|
||||
src/sqlitetypes.cpp
|
||||
src/sqltextedit.cpp
|
||||
src/grammar/Sqlite3Lexer.cpp
|
||||
src/grammar/Sqlite3Parser.cpp
|
||||
)
|
||||
|
||||
set(SQLB_FORMS
|
||||
src/AboutDialog.ui
|
||||
src/CreateIndexDialog.ui
|
||||
src/EditDialog.ui
|
||||
src/EditTableDialog.ui
|
||||
src/ExportCsvDialog.ui
|
||||
src/ImportCsvDialog.ui
|
||||
src/MainWindow.ui
|
||||
src/PreferencesDialog.ui
|
||||
src/SqlExecutionArea.ui
|
||||
src/VacuumDialog.ui
|
||||
)
|
||||
|
||||
set(SQLB_RESOURCES
|
||||
src/icons/icons.qrc
|
||||
)
|
||||
|
||||
QT4_WRAP_CPP(SQLB_HDR_MOC ${SQLB_HDR})
|
||||
QT4_WRAP_UI(SQLB_FORM_HDR ${SQLB_FORMS})
|
||||
QT4_ADD_RESOURCES(SQLB_RESOURCES_RCC ${SQLB_RESOURCES})
|
||||
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${ANTLR_DIR} ${QHEXEDIT_DIR} src)
|
||||
|
||||
add_executable(${PROJECT_NAME} ${SQLB_HDR} ${SQLB_SRC} ${SQLB_FORM_HDR} ${SQLB_HDR_MOC} ${SQLB_RESOURCES_RCC})
|
||||
|
||||
add_dependencies(${PROJECT_NAME} antlr qhexedit)
|
||||
|
||||
link_directories(${CMAKE_CURRENT_BINARY_DIR}/${ANTLR_DIR} ${CMAKE_CURRENT_BINARY_DIR}/${QHEXEDIT_DIR})
|
||||
|
||||
target_link_libraries(${PROJECT_NAME} antlr qhexedit ${QT_LIBRARIES} sqlite3)
|
||||
@@ -0,0 +1,89 @@
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
|
||||
set(ANTLR_SRC
|
||||
src/ANTLRUtil.cpp
|
||||
src/ASTFactory.cpp
|
||||
src/ASTNULLType.cpp
|
||||
src/ASTRefCount.cpp
|
||||
src/BaseAST.cpp
|
||||
src/BitSet.cpp
|
||||
src/CharBuffer.cpp
|
||||
src/CharScanner.cpp
|
||||
src/CommonAST.cpp
|
||||
src/CommonASTWithHiddenTokens.cpp
|
||||
src/CommonHiddenStreamToken.cpp
|
||||
src/CommonToken.cpp
|
||||
src/InputBuffer.cpp
|
||||
src/LLkParser.cpp
|
||||
src/MismatchedCharException.cpp
|
||||
src/MismatchedTokenException.cpp
|
||||
src/NoViableAltException.cpp
|
||||
src/NoViableAltForCharException.cpp
|
||||
src/Parser.cpp
|
||||
src/RecognitionException.cpp
|
||||
src/String.cpp
|
||||
src/Token.cpp
|
||||
src/TokenBuffer.cpp
|
||||
src/TokenRefCount.cpp
|
||||
src/TokenStreamBasicFilter.cpp
|
||||
src/TokenStreamHiddenTokenFilter.cpp
|
||||
src/TokenStreamRewriteEngine.cpp
|
||||
src/TokenStreamSelector.cpp
|
||||
src/TreeParser.cpp
|
||||
)
|
||||
|
||||
set(ANTLR_HDR
|
||||
antlr/ANTLRException.hpp
|
||||
antlr/ANTLRUtil.hpp
|
||||
antlr/AST.hpp
|
||||
antlr/ASTArray.hpp
|
||||
antlr/ASTFactory.hpp
|
||||
antlr/ASTNULLType.hpp
|
||||
antlr/ASTPair.hpp
|
||||
antlr/ASTRefCount.hpp
|
||||
antlr/BaseAST.hpp
|
||||
antlr/BitSet.hpp
|
||||
antlr/CharBuffer.hpp
|
||||
antlr/CharInputBuffer.hpp
|
||||
antlr/CharScanner.hpp
|
||||
antlr/CharStreamException.hpp
|
||||
antlr/CharStreamIOException.hpp
|
||||
antlr/CircularQueue.hpp
|
||||
antlr/CommonAST.hpp
|
||||
antlr/CommonASTWithHiddenTokens.hpp
|
||||
antlr/CommonHiddenStreamToken.hpp
|
||||
antlr/CommonToken.hpp
|
||||
antlr/IOException.hpp
|
||||
antlr/InputBuffer.hpp
|
||||
antlr/LLkParser.hpp
|
||||
antlr/LexerSharedInputState.hpp
|
||||
antlr/MismatchedCharException.hpp
|
||||
antlr/MismatchedTokenException.hpp
|
||||
antlr/NoViableAltException.hpp
|
||||
antlr/NoViableAltForCharException.hpp
|
||||
antlr/Parser.hpp
|
||||
antlr/ParserSharedInputState.hpp
|
||||
antlr/RecognitionException.hpp
|
||||
antlr/RefCount.hpp
|
||||
antlr/SemanticException.hpp
|
||||
antlr/String.hpp
|
||||
antlr/Token.hpp
|
||||
antlr/TokenBuffer.hpp
|
||||
antlr/TokenRefCount.hpp
|
||||
antlr/TokenStream.hpp
|
||||
antlr/TokenStreamBasicFilter.hpp
|
||||
antlr/TokenStreamException.hpp
|
||||
antlr/TokenStreamHiddenTokenFilter.hpp
|
||||
antlr/TokenStreamIOException.hpp
|
||||
antlr/TokenStreamRecognitionException.hpp
|
||||
antlr/TokenStreamRetryException.hpp
|
||||
antlr/TokenStreamRewriteEngine.hpp
|
||||
antlr/TokenStreamSelector.hpp
|
||||
antlr/TokenWithIndex.hpp
|
||||
antlr/TreeParser.hpp
|
||||
antlr/TreeParserSharedInputState.hpp
|
||||
antlr/config.hpp
|
||||
)
|
||||
|
||||
add_library(antlr ${ANTLR_SRC} ${ANTLR_HDR})
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
|
||||
find_package(Qt4 COMPONENTS QtCore QtGui REQUIRED)
|
||||
|
||||
include(${QT_USE_FILE})
|
||||
add_definitions(${QT_DEFINITIONS})
|
||||
|
||||
set(QHEXEDIT_SRC
|
||||
src/commands.cpp
|
||||
src/qhexedit.cpp
|
||||
src/qhexedit_p.cpp
|
||||
src/xbytearray.cpp
|
||||
)
|
||||
|
||||
set(QHEXEDIT_HDR
|
||||
src/commands.h
|
||||
src/qhexedit.h
|
||||
src/qhexedit_p.h
|
||||
src/xbytearray.h
|
||||
)
|
||||
|
||||
QT4_WRAP_CPP(QHEXEDIT_HDR_MOC ${QHEXEDIT_HDR})
|
||||
|
||||
add_library(qhexedit ${QHEXEDIT_SRC} ${QHEXEDIT_HDR} ${QHEXEDIT_HDR_MOC})
|
||||
|
||||
Reference in New Issue
Block a user