File: CMakeLists.txt

package info (click to toggle)
mysql-workbench 6.3.8%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 113,932 kB
  • ctags: 87,814
  • sloc: ansic: 955,521; cpp: 427,465; python: 59,728; yacc: 59,129; xml: 54,204; sql: 7,091; objc: 965; makefile: 638; sh: 613; java: 237; perl: 30; ruby: 6; php: 1
file content (113 lines) | stat: -rw-r--r-- 5,102 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
include_directories(.
    ./src
    ${PROJECT_SOURCE_DIR}/generated
    ${PROJECT_SOURCE_DIR}/backend/wbpublic
    ${PROJECT_SOURCE_DIR}/library/grt/src 
    ${PROJECT_SOURCE_DIR}/library/grt/src/diff 
    ${PROJECT_SOURCE_DIR}/library/base
    ${PROJECT_SOURCE_DIR}/library/forms
    ${PROJECT_SOURCE_DIR}/library/sql.parser/include
    ${PROJECT_SOURCE_DIR}/library/sql.parser/source
    ${PROJECT_SOURCE_DIR}/library/sql.parser/source/linux
    ${PROJECT_SOURCE_DIR}/modules
    ${PROJECT_SOURCE_DIR}/modules/interfaces
    ${PROJECT_SOURCE_DIR}/ext/antlr-runtime
    ${PROJECT_SOURCE_DIR}/ext/antlr-runtime/include
    ${PROJECT_SOURCE_DIR}/library/mysql.parser   
    ${VSQLITE_INCLUDE_DIRS}
    ${GTK2_INCLUDE_DIRS}
    ${SIGC++_INCLUDE_DIRS}
    ${GRT_INCLUDE_DIRS}
    ${PCRE_INCLUDE_DIR}
    ${PROJECT_SOURCE_DIR}
    ${MySQL_INCLUDE_DIRS}
)

if (MYSQL_DEFINITIONS)
	add_definitions(${MYSQL_DEFINITIONS})
endif()

if (UNIX)
    add_definitions(-DHAVE_MEMCPY=1 -DHAVE_MEMMOVE=1 -DUSE_MB=1 -DUSE_MB_IDENT=1 -DHAVE_STRTOUL=1)
endif()
    

add_library(db.mysql.sqlparser.grt
    src/db.mysql.sqlparser.cpp
    src/mysql_invalid_sql_parser.cpp
    src/mysql_sql_facade.cpp
    src/mysql_sql_parser_base.cpp
    src/mysql_sql_specifics.cpp
    src/mysql_sql_normalizer.cpp
    src/mysql_sql_parser.cpp
    src/mysql_sql_parser_fe.cpp
    src/mysql_sql_parser_utils.cpp
    src/mysql_sql_schema_rename.cpp
    src/mysql_sql_script_splitter.cpp
    src/mysql_sql_inserts_loader.cpp
    src/mysql_sql_syntax_check.cpp
    src/mysql_sql_semantic_check.cpp
    src/mysql_sql_statement_decomposer.cpp
    ${PROJECT_SOURCE_DIR}/library/sql.parser/source/charset-def.cpp
    ${PROJECT_SOURCE_DIR}/library/sql.parser/source/charset.cpp
    ${PROJECT_SOURCE_DIR}/library/sql.parser/source/ctype-big5.cpp
    ${PROJECT_SOURCE_DIR}/library/sql.parser/source/ctype-bin.cpp
    ${PROJECT_SOURCE_DIR}/library/sql.parser/source/ctype-cp932.cpp
    ${PROJECT_SOURCE_DIR}/library/sql.parser/source/ctype-czech.cpp
    ${PROJECT_SOURCE_DIR}/library/sql.parser/source/ctype-eucjpms.cpp
    ${PROJECT_SOURCE_DIR}/library/sql.parser/source/ctype-euc_kr.cpp
    ${PROJECT_SOURCE_DIR}/library/sql.parser/source/ctype-extra.cpp
    ${PROJECT_SOURCE_DIR}/library/sql.parser/source/ctype-gb2312.cpp
    ${PROJECT_SOURCE_DIR}/library/sql.parser/source/ctype-gbk.cpp
    ${PROJECT_SOURCE_DIR}/library/sql.parser/source/ctype-latin1.cpp
    ${PROJECT_SOURCE_DIR}/library/sql.parser/source/ctype-mb.cpp
    ${PROJECT_SOURCE_DIR}/library/sql.parser/source/ctype-simple.cpp
    ${PROJECT_SOURCE_DIR}/library/sql.parser/source/ctype-sjis.cpp
    ${PROJECT_SOURCE_DIR}/library/sql.parser/source/ctype-tis620.cpp
    ${PROJECT_SOURCE_DIR}/library/sql.parser/source/ctype-uca.cpp
    ${PROJECT_SOURCE_DIR}/library/sql.parser/source/ctype-ucs2.cpp
    ${PROJECT_SOURCE_DIR}/library/sql.parser/source/ctype-ujis.cpp
    ${PROJECT_SOURCE_DIR}/library/sql.parser/source/ctype-utf8.cpp
    ${PROJECT_SOURCE_DIR}/library/sql.parser/source/ctype-win1250ch.cpp
    ${PROJECT_SOURCE_DIR}/library/sql.parser/source/ctype.cpp
    ${PROJECT_SOURCE_DIR}/library/sql.parser/source/int2str.cpp
    ${PROJECT_SOURCE_DIR}/library/sql.parser/source/myx_lex_helpers.cpp
    ${PROJECT_SOURCE_DIR}/library/sql.parser/source/myx_sql_tree_item.cpp
    ${PROJECT_SOURCE_DIR}/library/sql.parser/source/myx_statement_parser.cpp
    ${PROJECT_SOURCE_DIR}/library/sql.parser/source/myx_unicode_scanner.cpp
    ${PROJECT_SOURCE_DIR}/library/sql.parser/source/sql_parser_symbols.cpp
    ${PROJECT_SOURCE_DIR}/library/sql.parser/source/my_messnc.cpp
    ${PROJECT_SOURCE_DIR}/library/sql.parser/source/my_static.cpp
    ${PROJECT_SOURCE_DIR}/library/sql.parser/source/my_strtoll10.cpp
    ${PROJECT_SOURCE_DIR}/library/sql.parser/source/my_vsnprintf.cpp
    ${PROJECT_SOURCE_DIR}/library/sql.parser/source/strmake.cpp
    ${PROJECT_SOURCE_DIR}/library/sql.parser/source/strnmov.cpp
    ${PROJECT_SOURCE_DIR}/library/sql.parser/source/strtod.cpp
    ${PROJECT_SOURCE_DIR}/library/sql.parser/source/strxmov.cpp
    ${PROJECT_SOURCE_DIR}/library/sql.parser/source/str_alloc.cpp
    ${PROJECT_SOURCE_DIR}/library/sql.parser/source/linux/myx_sql_parser.cpp
    ${PROJECT_SOURCE_DIR}/library/sql.parser/source/xml.cpp
)

#We need to wait for mysqlparser, because we're including some antlr headers which parser depends on
add_dependencies(db.mysql.sqlparser.grt mysqlparser)


target_link_libraries(db.mysql.sqlparser.grt ${GRT_LIBRARIES} ${GTK2_LIBRARIES} ${SIGC++_LIBRARIES} ${PCRE_LIBRARIES})

set_target_properties(db.mysql.sqlparser.grt
                      PROPERTIES PREFIX    ""
                                 VERSION   ${WB_VERSION}
                                 SOVERSION ${WB_VERSION})


if(COMMAND cotire)
    set_target_properties(db.mysql.sqlparser.grt PROPERTIES 
        COTIRE_ENABLE_PRECOMPILED_HEADER FALSE
        COTIRE_ADD_UNITY_BUILD FALSE
        COTIRE_PREFIX_HEADER_IGNORE_PATH "${PRECOMPILED_HEADERS_EXCLUDE_PATHS}")
    cotire(db.mysql.sqlparser.grt)
endif()


install(TARGETS db.mysql.sqlparser.grt DESTINATION ${WB_PYTHON_MODULES_DIR})