From: <ibr...@us...> - 2011-06-24 00:01:23
|
Revision: 3984 http://tora.svn.sourceforge.net/tora/?rev=3984&view=rev Author: ibre5041 Date: 2011-06-24 00:01:06 +0000 (Fri, 24 Jun 2011) Log Message: ----------- Modified Paths: -------------- branches/tora-trotl/sandbox/OraclePLSQL.g branches/tora-trotl/sandbox/t2.cpp branches/tora-trotl/sandbox/tplsqlparseoracle.cpp branches/tora-trotl/sandbox/tsqlparse.h branches/tora-trotl/sandbox/tsqlparse.tcc branches/tora-trotl/sandbox/tsqlparseoracle.cpp branches/tora-trotl/src/CMakeLists.txt branches/tora-trotl/src/parsing/OraclePLSQLLexer.c branches/tora-trotl/src/parsing/OraclePLSQLLexer.h branches/tora-trotl/src/parsing/OraclePLSQLParser.c branches/tora-trotl/src/parsing/OraclePLSQLParser.h branches/tora-trotl/src/pdfview/pdfviewwidget.cpp branches/tora-trotl/src/pdfview/pdfviewwidget.ui Modified: branches/tora-trotl/sandbox/OraclePLSQL.g =================================================================== --- branches/tora-trotl/sandbox/OraclePLSQL.g 2011-06-21 21:46:34 UTC (rev 3983) +++ branches/tora-trotl/sandbox/OraclePLSQL.g 2011-06-24 00:01:06 UTC (rev 3984) @@ -58,7 +58,14 @@ T_FUNCTION_BLOCK='t_function_block'; T_DECLARE_BLOCK='t_declare_block'; T_BEGIN_BLOCK='t_begin_block'; - T_EXCEPTIONS_BLOCK='t_exceptions_block'; + T_EXCEPTIONS_BLOCK='t_exceptions_block'; + T_IF='t_if'; + T_ELSIF='t_elsif'; + T_ELSE='t_else'; + T_ENDIF='t_endif'; + + T_DECLARATION = 't_declaration'; + T_STATEMENT = 't_statement'; } @lexer::includes { @@ -177,18 +184,18 @@ ; declare_section : - ( type_definition SEMI - | subtype_definition SEMI - | cursor_definition SEMI - | item_declaration SEMI - | function_declaration_or_definition SEMI - | procedure_declaration_or_definition SEMI - | pragma SEMI + ( type_definition SEMI -> ^('t_declaration' type_definition SEMI) + | subtype_definition SEMI -> ^('t_declaration' subtype_definition SEMI) + | cursor_definition SEMI -> ^('t_declaration' cursor_definition SEMI) + | item_declaration SEMI -> ^('t_declaration' item_declaration SEMI) + | function_declaration_or_definition SEMI -> ^('t_declaration' function_declaration_or_definition SEMI) + | procedure_declaration_or_definition SEMI -> ^('t_declaration' procedure_declaration_or_definition SEMI) + | pragma -> ^('t_declaration' pragma) )* ; cursor_definition : - k_cursor identifier[T_CURSOR_NAME,T_DECL] parameter_declarations? (k_return datatype)? K_IS select_statement + k_cursor identifier[T_CURSOR_NAME,T_DECL] parameter_declarations? (k_return datatype)? k_is select_statement ; item_declaration @@ -210,11 +217,11 @@ ; type_definition : - k_type identifier[T_DATATYPE_NAME,T_DECL] ( K_IS | K_AS ) ( record_type_definition | collection_type_definition | ref_cursor_type_definition ) + k_type identifier[T_DATATYPE_NAME,T_DECL] ( k_is | k_as ) ( record_type_definition | collection_type_definition | ref_cursor_type_definition ) ; subtype_definition : - k_subtype identifier[T_DATATYPE_NAME,T_DECL] ( K_IS | K_AS ) datatype ( k_not k_null )? + k_subtype identifier[T_DATATYPE_NAME,T_DECL] ( k_is | k_as ) datatype ( k_not k_null )? ; record_type_definition : @@ -297,7 +304,7 @@ function_declaration_or_definition : function_heading ( k_deterministic | k_pipelined | k_parallel_enable (LPAREN ~(RPAREN)+ RPAREN)? | k_result_cache )* - ( ( K_IS | K_AS ) declare_section? body )? + ( ( k_is | k_as ) declare_section? body )? ; function_declaration : @@ -308,12 +315,12 @@ function_definition : function_heading ( k_deterministic | k_pipelined | k_parallel_enable (LPAREN ~(RPAREN)+ RPAREN)? | k_result_cache )* - ( K_IS | K_AS ) declare_section? body + ( k_is | k_as ) declare_section? body ; procedure_declaration_or_definition : procedure_heading - ( ( K_IS | K_AS ) declare_section? body )? + ( ( k_is | k_as ) declare_section? body )? ; procedure_declaration : @@ -322,17 +329,17 @@ procedure_definition : procedure_heading - ( K_IS | K_AS ) declare_section? body + ( k_is | k_as ) declare_section? body ; -body : - K_BEGIN statement SEMI ( statement SEMI | pragma SEMI )* - ( k_exception exception_handler+ )? k_end ID? +body + : k_begin pragma* statement* ( k_exception exception_handler+ )? k_end ID? + -> ^('t_block_block' pragma* statement* ^('t_exceptions_block' k_exception? exception_handler*) k_end ID?) ; exception_handler : k_when ( qual_id ( k_or qual_id )* | k_others ) - k_then ( statement SEMI )+ + k_then statement+ ; statement : @@ -347,10 +354,10 @@ | (k_goto) => goto_statement | (k_exit) => exit_statement | (k_return) => return_statement - | (K_DECLARE | K_BEGIN) => plsql_block + | (k_declare | k_begin) => plsql_block | (k_raise) => raise_statement | (k_fetch) => fetch_statement - | (K_LOOP) => basic_loop_statement + | (k_loop) => basic_loop_statement | (k_while) => while_loop_statement | (k_null) => null_statement | (k_for) => for_loop_statement @@ -360,22 +367,23 @@ // | procedure_call | assign_or_call_statement ) + SEMI ; lvalue - : call_first ( DOT call_next )* + : call_first[T_USEL] ( DOT call_next[T_USEL] )* ; assign_or_call_statement : lvalue ( DOT delete_call | ASSIGN expression )? ; -call_first - : (COLON? ID | BINDVAR | variable_name[T_USE] ) dblink_name? ( LPAREN ( parameter ( COMMA parameter )* )? RPAREN )? +call_first[int usageType] + : (bindvar | variable_name[usageType] ) dblink_name? ( LPAREN ( parameter ( COMMA parameter )* )? RPAREN )? ; -call_next - : (BINDVAR | variable_name_ex[T_USE] ) dblink_name? ( LPAREN ( parameter ( COMMA parameter )* )? RPAREN )? +call_next[int usageType] + : (variable_name_ex[usageType]) dblink_name? ( LPAREN ( parameter ( COMMA parameter )* )? RPAREN )? ; delete_call @@ -383,18 +391,18 @@ ; basic_loop_statement : - K_LOOP ( statement SEMI )+ k_end K_LOOP label_name? + k_loop statement+ k_end k_loop label_name? ; case_statement : k_case expression? - ( k_when expression k_then ( ( statement SEMI )+ | expression) )+ - ( k_else ( ( statement SEMI )+ | expression) )? + ( k_when expression k_then ( statement+ | expression) )+ + ( k_else ( statement+ | expression) )? k_end k_case? ; close_statement : - k_close ID ( DOT ID )? + k_close cursor_name ; continue_statement : @@ -438,7 +446,7 @@ ; for_loop_statement : - k_for ID K_IN ( ~(K_LOOP) )+ K_LOOP ( statement SEMI )+ k_end K_LOOP label_name? + k_for ID K_IN ( ~('LOOP') )+ k_loop statement+ k_end k_loop label_name? ; forall_statement : @@ -460,14 +468,30 @@ ; if_statement : - k_if expression k_then ( statement SEMI )+ - ( k_elsif expression k_then ( statement SEMI )+ )* - ( k_else ( statement SEMI )+ )? - k_end k_if + // k_if expression (k_then^ s1=statement+) + // ( k_elsif^ expression (k_then^ s2=statement+) )* + // ( k_else^ s3=statement+ )? + //k_end k_if //-> ^('t_endif' k_end k_if)) + if_statement_if + if_statement_elsif* + if_statement_else? + if_statement_end ; +if_statement_if + : k_if expression k_then statement+ -> ^('t_if' k_if expression k_then ^('t_block_block' statement+)) + ; +if_statement_elsif + : k_elsif expression k_then statement+ -> ^('t_elsif' k_elsif expression k_then ^('t_block_block' statement+)) + ; +if_statement_else + : k_else statement+ -> ^('t_else' k_else ^('t_block_block' statement+)) + ; +if_statement_end + : k_end k_if ->^('t_endif' k_end k_if) + ; -null_statement : - k_null +null_statement + : k_null ; open_statement : @@ -476,7 +500,7 @@ ; pragma : - k_pragma swallow_to_semi + k_pragma swallow_to_semi SEMI ; raise_statement : @@ -488,7 +512,7 @@ ; plsql_block : - ( K_DECLARE declare_section )? body + ( k_declare declare_section )? body -> ^('t_block_block' k_declare? declare_section? body) ; label : @@ -508,7 +532,7 @@ cursor_name : (schema_name DOT)? identifier[T_CURSOR_NAME,T_USE] - | BINDVAR + | bindvar | COLON identifier[T_CURSOR_NAME,T_USE] ; @@ -540,7 +564,7 @@ ; parameter_name[int usageType] - : identifier[T_VARIABLE_NAME,usageType] + : identifier[T_PARAMETER_NAME,usageType] | 'FOUND' | 'TIMESTAMP' | 'TYPE' @@ -654,7 +678,7 @@ ; while_loop_statement : - k_while expression K_LOOP ( statement SEMI )+ k_end K_LOOP label_name? + k_while expression k_loop statement+ k_end k_loop label_name? ; pipe_row_statement : @@ -686,7 +710,7 @@ ; is_null_expr - : like_expr ( K_IS k_not? k_null)? + : like_expr ( k_is k_not? k_null)? ; like_expr @@ -736,7 +760,7 @@ ; variable_or_function_call - : call_first ( DOT call_next )* ( DOT delete_call )? + : call_first[T_USE] ( DOT call_next[T_USE] )* ( DOT delete_call )? ; timestamp_expression @@ -745,7 +769,7 @@ ; cast_expression - : k_cast LPAREN (expression /* TODO | k_multiset subquery */) K_AS (datatype | identifier[T_DATATYPE_NAME,T_USE] ) RPAREN + : k_cast LPAREN (expression /* TODO | k_multiset subquery */) k_as (datatype | identifier[T_DATATYPE_NAME,T_USE] ) RPAREN ; extract_datetime_expression @@ -831,12 +855,12 @@ create_package : k_create ( k_or kREPLACE )? k_package ( schema_name DOT )? package_name[T_DECL] ( invoker_rights_clause )? - ( K_IS | K_AS ) ( declare_section )? k_end package_name[T_USE]? SEMI + ( k_is | k_as ) ( declare_section )? k_end package_name[T_USE]? SEMI ; create_package_body : k_create ( k_or kREPLACE )? k_package k_body ( schema_name DOT )? package_name[T_DECL] - ( K_IS | K_AS ) ( declare_section )? + ( k_is | k_as ) ( declare_section )? ( initialize_section=body | k_end package_name[T_USE]? ) SEMI ; @@ -845,7 +869,7 @@ k_create ( k_or kREPLACE )? k_procedure ( schema_name DOT )? procedure_name[T_DECL] ( LPAREN parameter_declaration ( COMMA parameter_declaration )* RPAREN )? invoker_rights_clause? - ( K_IS | K_AS ) + ( k_is | k_as ) ( declare_section? body | call_spec | k_external @@ -859,7 +883,7 @@ ( LPAREN parameter_declaration ( COMMA parameter_declaration )* RPAREN )? k_return datatype ( k_deterministic | k_pipelined | k_parallel_enable (LPAREN ~(RPAREN)+ RPAREN)? | k_result_cache | invoker_rights_clause )* - ( ( K_IS | K_AS ) declare_section? body + ( ( k_is | k_as ) declare_section? body | call_spec | k_external | k_aggregate? using_clause @@ -872,8 +896,8 @@ // ( k_enable | k_disable )? // ( k_when LPAREN expression /*TODO condition*/ RPAREN )? // ( plsql_block | k_call routine_clause | comp_block) - ~(K_DECLARE|K_BEGIN)* - (K_DECLARE|K_BEGIN) => plsql_block + ~('DECLARE'|'BEGIN')* + (k_declare|k_begin) => plsql_block SEMI ; @@ -881,7 +905,7 @@ k_create ( k_or kREPLACE )? //type_definition k_type t=identifier[T_DATATYPE_NAME, T_DECL] - //( K_IS | K_AS ) + //( k_is | k_as ) swallow_to_semi (SEMI|EOF) // TODO remove '?' and EOF ; @@ -953,7 +977,7 @@ k_aggregate : r='AGGREGATE' { $r->setType($r, T_RESERVED); $r->user1 = T_RESERVED; } ; k_and : r='AND' { $r->setType($r, T_RESERVED); $r->user1 = T_RESERVED; } ; k_array : r='ARRAY' { $r->setType($r, T_RESERVED); $r->user1 = T_RESERVED; } ; -K_AS : 'AS'; +k_as : r='AS' { $r->setType($r, T_RESERVED); $r->user1 = T_RESERVED; } ; k_authid : r='AUTHID' { $r->setType($r, T_RESERVED); $r->user1 = T_RESERVED; } ; k_between : r='BETWEEN' { $r->setType($r, T_RESERVED); $r->user1 = T_RESERVED; } ; k_body : r='BODY' { $r->setType($r, T_RESERVED); $r->user1 = T_RESERVED; } ; @@ -983,7 +1007,7 @@ k_index : r='INDEX' { $r->setType($r, T_RESERVED); $r->user1 = T_RESERVED; } ; k_insert : r='INSERT' { $r->setType($r, T_RESERVED); $r->user1 = T_RESERVED; } ; k_into : r='INTO' { $r->setType($r, T_RESERVED); $r->user1 = T_RESERVED; } ; -K_IS : 'IS'; +k_is : r='IS' { $r->setType($r, T_RESERVED); $r->user1 = T_RESERVED; } ; k_language : r='LANGUAGE' { $r->setType($r, T_RESERVED); $r->user1 = T_RESERVED; } ; k_like : r='LIKE' { $r->setType($r, T_RESERVED); $r->user1 = T_RESERVED; } ; k_limit : r='LIMIT' { $r->setType($r, T_RESERVED); $r->user1 = T_RESERVED; } ; @@ -1016,7 +1040,7 @@ k_deleting : r='DELETING' { $r->setType($r, T_RESERVED); $r->user1 = T_RESERVED; } ; //k_isopen : r='ISOPEN' { $r->setType($r, T_RESERVED); $r->user1 = T_RESERVED; } ; k_exists : r='EXISTS' { $r->setType($r, T_RESERVED); $r->user1 = T_RESERVED; } ; -K_BEGIN : 'BEGIN'; +k_begin : r='BEGIN' { $r->setType($r, T_RESERVED); $r->user1 = T_RESERVED; } ; k_call : r='CALL' { $r->setType($r, T_RESERVED); $r->user1 = T_RESERVED; } ; k_cast : r='CAST' { $r->setType($r, T_RESERVED); $r->user1 = T_RESERVED; } ; k_clob : r='CLOB' { $r->setType($r, T_RESERVED); $r->user1 = T_RESERVED; } ; @@ -1025,7 +1049,7 @@ k_continue : r='CONTINUE' { $r->setType($r, T_RESERVED); $r->user1 = T_RESERVED; } ; k_cursor : r='CURSOR' { $r->setType($r, T_RESERVED); $r->user1 = T_RESERVED; } ; //k_disable : r='DISABLE' { $r->setType($r, T_RESERVED); $r->user1 = T_RESERVED; } ; -K_DECLARE : 'DECLARE' ; +k_declare : r='DECLARE' { $r->setType($r, T_RESERVED); $r->user1 = T_RESERVED; } ; k_deterministic : r='DETERMINISTIC' { $r->setType($r, T_RESERVED); $r->user1 = T_RESERVED; } ; //k_enable : r='ENABLE' { $r->setType($r, T_RESERVED); $r->user1 = T_RESERVED; } ; k_end : r='END' { $r->setType($r, T_RESERVED); $r->user1 = T_RESERVED; } ; @@ -1037,7 +1061,7 @@ k_function : r='FUNCTION' { $r->setType($r, T_RESERVED); $r->user1 = T_RESERVED; } ; k_immediate : r='IMMEDIATE' { $r->setType($r, T_RESERVED); $r->user1 = T_RESERVED; } ; k_interval : r='INTERVAL' { $r->setType($r, T_RESERVED); $r->user1 = T_RESERVED; } ; -K_LOOP : 'LOOP'; +k_loop : r='LOOP' { $r->setType($r, T_RESERVED); $r->user1 = T_RESERVED; } ; k_merge : r='MERGE' { $r->setType($r, T_RESERVED); $r->user1 = T_RESERVED; } ; k_national : r='NATIONAL' { $r->setType($r, T_RESERVED); $r->user1 = T_RESERVED; } ; k_nocopy : r='NOCOPY' { $r->setType($r, T_RESERVED); $r->user1 = T_RESERVED; } ; @@ -1096,7 +1120,10 @@ ( { LA(1) == $delimiter->getText(delimiter)->chars[0] && LA(2) == '\'' }? => . ) QUOTE { INPUT->istream->_LA = oldLA; } ; - +bindvar + : b=BINDVAR { $b->setType($b, T_BINDVAR_NAME); $b->user1 = T_BINDVAR_NAME, $b->user2 = T_USE; } + | COLON i=ID { $i->setType($i, T_BINDVAR_NAME); $i->user1 = T_BINDVAR_NAME, $i->user2 = T_USE; } + ; BINDVAR /*options { testLiterals=true; }*/ : COLON 'A' .. 'Z' ( 'A' .. 'Z' | '0' .. '9' | '_' | '$' | '#' | COLON )* | COLON DOUBLEQUOTED_STRING Modified: branches/tora-trotl/sandbox/t2.cpp =================================================================== --- branches/tora-trotl/sandbox/t2.cpp 2011-06-21 21:46:34 UTC (rev 3983) +++ branches/tora-trotl/sandbox/t2.cpp 2011-06-24 00:01:06 UTC (rev 3984) @@ -54,7 +54,7 @@ { std::cout << "PLSQL:" << std::endl; std::auto_ptr <SQLParser::Statement> stat = StatementFactTwoParmSing::Instance().create("OraclePLSQL", statement, fileName); - std::cout << stat->root()->toStringRecursive().toAscii().constData() << std::endl; + std::cout << stat->root()->toStringRecursive().toStdString() << std::endl; return 0; } else if( QString::compare("WITH", firstWord, Qt::CaseInsensitive) == 0 || QString::compare("SELECT", firstWord, Qt::CaseInsensitive) == 0 || @@ -65,7 +65,7 @@ ) { std::cout << "SQL:" << std::endl; std::auto_ptr <SQLParser::Statement> stat = StatementFactTwoParmSing::Instance().create("OracleSQL", statement, fileName); - std::cout << stat->root()->toStringRecursive().toAscii().constData() << std::endl; + std::cout << stat->root()->toStringRecursive().toStdString() << std::endl; return 0; } else { std::cout << "Unknown:" << firstWord.QString::toStdString() << std::endl; Modified: branches/tora-trotl/sandbox/tplsqlparseoracle.cpp =================================================================== --- branches/tora-trotl/sandbox/tplsqlparseoracle.cpp 2011-06-21 21:46:34 UTC (rev 3983) +++ branches/tora-trotl/sandbox/tplsqlparseoracle.cpp 2011-06-24 00:01:06 UTC (rev 3984) @@ -26,6 +26,27 @@ case T_RESERVED: token_type = L_RESERVED; break; + case T_BINDVAR_NAME: + token_type = L_BINDVARNAME; + break; + case T_VARIABLE_NAME: + token_type = L_VARIABLE; + break; + case T_DATATYPE_NAME: + token_type = L_DATATYPE; + break; + case T_SCHEMA_NAME: + token_type = L_SCHEMANAME; + break; + case T_FUNCTION_NAME: + token_type = L_FUNCTIONNAME; + break; + case T_PACKAGE_NAME: + token_type = L_PACKAGENAME; + break; + case T_PARAMETER_NAME: + token_type = L_PARAMETER; + break; } // switch(tokentype) UsageType &usage_type = const_cast<Token::UsageType&>(_mUsageType); @@ -38,9 +59,9 @@ case T_USE: usage_type = Usage; break; - case T_USE_L: - usage_type = Usage; - break; + case T_USEL: + usage_type = UsageL; + break; case T_DECL: usage_type = Declaration; break; Modified: branches/tora-trotl/sandbox/tsqlparse.h =================================================================== --- branches/tora-trotl/sandbox/tsqlparse.h 2011-06-21 21:46:34 UTC (rev 3983) +++ branches/tora-trotl/sandbox/tsqlparse.h 2011-06-24 00:01:06 UTC (rev 3984) @@ -81,7 +81,6 @@ }; enum TokenType - // TODO remove dependency in antlr runtime headers { // Special node types X_UNASSIGNED = 0, @@ -94,11 +93,16 @@ L_SCHEMANAME, L_FUNCTIONNAME, L_PACKAGENAME, + L_BINDVARNAME, L_TABLEALIAS, L_IDENTIFIER, L_JOIN, L_ON, L_USING, + // Leaf node (PLSQL only) + L_VARIABLE, + L_DATATYPE, + L_PARAMETER, // Structural node types S_SUBQUERY_FACTORED, S_SUBQUERY_NESTED, @@ -117,7 +121,8 @@ { Unknown, Declaration, - Usage + Usage, + UsageL // Used in LVALUE }; /* enum DisplayType */ Modified: branches/tora-trotl/sandbox/tsqlparse.tcc =================================================================== --- branches/tora-trotl/sandbox/tsqlparse.tcc 2011-06-21 21:46:34 UTC (rev 3983) +++ branches/tora-trotl/sandbox/tsqlparse.tcc 2011-06-24 00:01:06 UTC (rev 3984) @@ -19,11 +19,15 @@ ,"SCHEMANAME" ,"FUNCTIONNAME" ,"PACKAGENAME" + ,"BINDVARNAME" ,"TABLEALIAS" ,"IDENTIFIER" ,"JOIN" ,"ON" ,"USING" + ,"VARIABLE" + ,"DATATYPE" + ,"PARAMETER" ,"SUBQUERY_FACTORED" ,"SUBQUERY_NESTED" ,"SUBQUERY_ALIAS" Modified: branches/tora-trotl/sandbox/tsqlparseoracle.cpp =================================================================== --- branches/tora-trotl/sandbox/tsqlparseoracle.cpp 2011-06-21 21:46:34 UTC (rev 3983) +++ branches/tora-trotl/sandbox/tsqlparseoracle.cpp 2011-06-24 00:01:06 UTC (rev 3984) @@ -49,6 +49,9 @@ case T_PACKAGE_NAME: token_type = L_PACKAGENAME; break; + case T_BINDVAR_NAME: + token_type = L_BINDVARNAME; + break; case T_COLUMN_ALIAS: case T_COLUMN_NAME: token_type = L_IDENTIFIER; Modified: branches/tora-trotl/src/CMakeLists.txt =================================================================== --- branches/tora-trotl/src/CMakeLists.txt 2011-06-21 21:46:34 UTC (rev 3983) +++ branches/tora-trotl/src/CMakeLists.txt 2011-06-24 00:01:06 UTC (rev 3984) @@ -1,780 +1,780 @@ -INCLUDE(ToraCompat) -INCLUDE(PCHSupport_26) - -#Subdirectories -# ADD_SUBDIRECTORY(i18n) -ADD_SUBDIRECTORY(loki) -IF (WIN32) - ADD_SUBDIRECTORY(windows) -ENDIF (WIN32) - -ADD_SUBDIRECTORY(trotl) -ADD_SUBDIRECTORY(libantlr3c-3.3) - -# Default: qsci2 as 3rd party lib! -IF (WANT_INTERNAL_QSCINTILLA) - ADD_SUBDIRECTORY(qscintilla2) -ENDIF(WANT_INTERNAL_QSCINTILLA) - -# only toad bindings are here. All others qm files will blow the binary too much -SET (TORA_I18N_TS - i18n/tora_toad.ts -) - -SET(TORA_RCC_FILES tora.qrc) - -SET(TORA_UI_SRC - toaboutui.ui - tobrowserconstraintui.ui - tobrowserfilterui.ui - tobrowserindexui.ui - tobrowsertableui.ui - toconnectionimportui.ui - todatabasesettingui.ui - todebugchangeui.ui - todebugwatch.ui - todescribeui.ui - todroptablespaceui.ui - toeditextensionsetupui.ui - toglobalsettingui.ui - tohelpaddfileui.ui - tohelpui.ui - tohelpsetupui.ui - tochartalarmui.ui - tochartsetupui.ui - tolinechartsetupui.ui - tomessageui.ui - tonewconnectionui.ui - topreferencesui.ui - toresultcontentfilterui.ui - toresultlistformatui.ui - torollbackdialogui.ui -# toschedulerui.ui - toscriptui.ui - toscriptschemawidgetui.ui - tosearchreplaceui.ui - tosecurityquotaui.ui - tosecurityroleui.ui - tosecurityuserui.ui - tostoragedatafileui.ui - tostoragedefinitionui.ui - tostoragedialogui.ui - tostorageprefsui.ui - tostoragetablespaceui.ui - tosyntaxsetupui.ui - totemplateaddfileui.ui - totemplateeditui.ui - totemplatesetupui.ui - totoolsettingui.ui - totuningoverviewui.ui - totuningsettingui.ui - toworksheetsetupui.ui - # shortcuteditor - shortcuteditor/shortcuteditordialog.ui - connectioncolorsdialogui.ui -) -IF (ORACLE_FOUND) - LIST (APPEND TORA_UI_SRC tooraclesettingui.ui) -ENDIF (ORACLE_FOUND) - -IF (POPPLER_QT4_FOUND) - LIST(APPEND TORA_UI_SRC pdfview/pdfviewwidget.ui) -ENDIF (POPPLER_QT4_FOUND) - -SET(TORA_MOC_CLASSES - toabout.h - toalert.h - toanalyze.h - toawr.h - tobackground.h - tobackgroundlabel.h - tobackup.h -# tobackuptool.h - tobarchart.h - tobrowserconstraint.h - tobrowser.h - toresultgrants.h - tobrowserindex.h - tobrowsertable.h - tobrowserbasewidget.h - tobrowseraccesswidget.h - tobrowsertablewidget.h - tobrowserviewwidget.h - tobrowserindexwidget.h - tobrowserschemawidget.h - tobrowsersequencewidget.h - tobrowsersynonymwidget.h - tobrowsercodewidget.h - tobrowsertriggerwidget.h - tobrowserdblinkswidget.h - tobrowserdirectorieswidget.h -# tobrowserschemabasewidget.h -# toconf.h -# toconfiguration.h - toconnection.h - toquery.h - #tocache.h - toconnectionimport.h - toconnectionmodel.h - toconnectionpool.h - todocklet.h - todockbar.h - topushbutton.h - torunnable.h - tocurrent.h - todatatype.h - todebug.h - todebugtext.h - todescribe.h -# todefaultkeywords.h - toeditextensions.h -# toeditwidget.h -# toextract.h - toeventquery.h - toeventquerytask.h - tofilesize.h - toglobalsetting.h - tohelp.h - tohelpsetup.h - tohighlightedtext.h -# tohtml.h - tochangeconnection.h - tochartmanager.h - toinvalid.h - tolegendchart.h - tolinechart.h -# tolistviewformattercsv.h -# tolistviewformatterfactory.h -# tolistviewformatter.h -# tolistviewformatterhtml.h -# tolistviewformatteridentifier.h -# tolistviewformattersql.h -# tolistviewformattertabdel.h -# tolistviewformattertext.h - tomain.h - tomainwindow.h -# tomainwindow.kde.h - tomarkedtext.h - tomemoeditor.h - tomodeleditor.h - tomessage.h -# tomysqlkeywords.h - tonewconnection.h - tooutput.h - toparamget.h - topiechart.h - toplsqleditor.h - toplsqltext.h - topreferences.h - toprofiler.h - toproject.h -# toqvalue.h -# toreport.h - toresultbar.h - toresultcolscomment.h - toresultcols.h - toresultcombo.h - toresultschema.h - toresultdepend.h - toresultextract.h - toresultfield.h - toresult.h - toresultitem.h - toresultlabel.h - toresultline.h - toresultlock.h - toresultlong.h - toresultmodel.h - tocodemodel.h - toresultparam.h - toresultpie.h - toresultplan.h -# toresultresources.h - toresultstats.h - toresultstorage.h - toresulttableview.h - toresulttableviewedit.h - toresultdata.h - toresultdatasingle.h - toresultview.h - toresultlistformat.h - torollback.h -# toscheduler.h - toscript.h - toscriptschemawidget.h -# toscripttreeitem.h - toscripttreemodel.h - tosearchreplace.h - tosecurity.h - tosecuritytreemodel.h -# tosecuritytreeitem.h - tosession.h - tosgastatement.h - tosgatrace.h - tosmtp.h -# tosplash.h - tosqledit.h -# tosql.h -# tosqlparse.h -# tostoragedefinition.h - tostorage.h - tosyntaxsetup.h - totableselect.h - totabwidget.h - totemplate.h - totemporary.h -# totextview.h - tothread_p.h - totreewidget.h -# totimer.h - totool.h - totuning.h - tounittest.h - tovisualize.h - towaitevents.h - toworksheet.h - toworkingwidget.h - toeditablemenu.h - toworksheetstatistic.h -# toworksheettext.h - toworksheetwidget.h - utils.h -# shortcuteditor - shortcuteditor/shortcuteditordialog.h - shortcuteditor/shortcutmodel.h -# docklets - docklets/toviewconnections.h - docklets/toviewdirectory.h -# -) -IF (ORACLE_FOUND) - LIST(APPEND TORA_MOC_CLASSES tooraclesetting.h) -ENDIF (ORACLE_FOUND) - -IF (POPPLER_QT4_FOUND) - LIST(APPEND TORA_MOC_CLASSES pdfview/documentwidget.h pdfview/pdfviewwidget.h) -ENDIF (POPPLER_QT4_FOUND) - -SET(TORA_SOURCES -# main.cpp - totool.cpp - totemplateprovider.cpp - topreferences.cpp - tomain.cpp - - #tosqlparsetest.cpp - toabout.cpp - toalert.cpp - toanalyze.cpp - toawr.cpp - tobackground.cpp - tobackgroundlabel.cpp - tobackup.cpp - tobackuptool.cpp - tobarchart.cpp - tobrowserconstraint.cpp - tobrowser.cpp - toresultgrants.cpp - tobrowserindex.cpp - tobrowsertable.cpp - tobrowserbasewidget.cpp - tobrowseraccesswidget.cpp - tobrowsertablewidget.cpp - tobrowserviewwidget.cpp - tobrowserindexwidget.cpp - tobrowserschemawidget.cpp - tobrowsersequencewidget.cpp - tobrowsersynonymwidget.cpp - tobrowsercodewidget.cpp - tobrowsertriggerwidget.cpp - tobrowserdblinkswidget.cpp - tobrowserdirectorieswidget.cpp -# tobrowserschemabasewidget.cpp - tocache.cpp - toconfiguration.cpp - toconnection.cpp - toquery.cpp - toqvalue.cpp - toconnectionimport.cpp - toconnectionmodel.cpp - toconnectionpool.cpp - todocklet.cpp - todockbar.cpp - topushbutton.cpp - torunnable.cpp - tocurrent.cpp - todatatype.cpp - todebug.cpp - todebugtext.cpp - todescribe.cpp - toeditextensions.cpp - toeditwidget.cpp - toextract.cpp - toextratranslations.cpp - toeventquery.cpp - toeventquerytask.cpp - tofilesize.cpp -# temporarily disabled due the lack of firebird here tofyracleconnection.cpp - toglobalsetting.cpp - tohelp.cpp - tohighlightedtext.cpp - tohtml.cpp - tochangeconnection.cpp - tochartmanager.cpp - toinvalid.cpp - tolegendchart.cpp - tolinechart.cpp - tolistviewformatter.cpp - tolistviewformattercsv.cpp - tolistviewformatterhtml.cpp - tolistviewformattersql.cpp - tolistviewformattertabdel.cpp - tolistviewformattertext.cpp - tomainwindow.cpp - tomarkedtext.cpp - tomemoeditor.cpp - tomodeleditor.cpp - tomessage.cpp - tonewconnection.cpp -#win only? toocistub.cpp - tooracleconnection_trotl.cpp - tooracleextract.cpp - tooraclepreload.cpp - tooutput.cpp - toparamget.cpp - topassword.cpp - topiechart.cpp - toplsqleditor.cpp - toplsqltext.cpp - toprofiler.cpp - toproject.cpp - toqsqlconnection.cpp - toreport.cpp - toresultbar.cpp - toresultcolscomment.cpp - toresultcols.cpp - toresultschema.cpp - toresultcombo.cpp - toresult.cpp - toresultdepend.cpp - toresultextract.cpp - toresultfield.cpp - toresultitem.cpp - toresultlabel.cpp - toresultline.cpp - toresultlock.cpp - toresultlong.cpp - toresultmodel.cpp - tocodemodel.cpp - toresultparam.cpp - toresultpie.cpp - toresultplan.cpp - toresultstats.cpp - toresultstorage.cpp - toresulttableview.cpp - toresulttableviewedit.cpp - toresultdata.cpp - toresultdatasingle.cpp - toresultview.cpp - toresultlistformat.cpp - torollback.cpp -# toscheduler.cpp - toscript.cpp - toscriptschemawidget.cpp - toscripttreeitem.cpp - toscripttreemodel.cpp - tosearchreplace.cpp - tosecurity.cpp - tosecuritytreemodel.cpp - tosecuritytreeitem.cpp - tosession.cpp - tosgastatement.cpp - tosgatrace.cpp - tosmtp.cpp - tosplash.cpp - tosql.cpp - tosqledit.cpp - tosqlparse.cpp - tostorage.cpp - tostoragedefinition.cpp - tosyntaxsetup.cpp - totableselect.cpp - totabwidget.cpp - totemplate.cpp - totemporary.cpp - totextview.cpp - tothread.cpp - totimer.cpp - totreewidget.cpp - totuning.cpp - tounittest.cpp - tovisualize.cpp - towaitevents.cpp - toworksheet.cpp - toworkingwidget.cpp - toeditablemenu.cpp - toworksheetstatistic.cpp - toworksheettext.cpp - toworksheetwidget.cpp - utils.cpp - # - migratetool/sqldeveloper.cpp - migratetool/squirrelsql.cpp - migratetool/tora3.cpp - # shortcuteditor - shortcuteditor/shortcuteditordialog.cpp - shortcuteditor/shortcutmodel.cpp - # docklets - docklets/toviewconnections.cpp - docklets/toviewdirectory.cpp - # - tooracletable.cpp -) - - -IF (DB2_FOUND) - LIST (APPEND TORA_SOURCES db2/todb2connection.cpp - db2/db2connectionsub.cpp - db2/db2provider.cpp - db2/db2query.cpp) - #db2/qsql_db2.cpp) -ENDIF (DB2_FOUND) - -IF (TERADATA_FOUND) - LIST (APPEND TORA_SOURCES toteradataconnection.cpp) -ENDIF (TERADATA_FOUND) - -IF (POPPLER_QT4_FOUND) - LIST(APPEND TORA_SOURCES pdfview/pdfviewwidget.cpp pdfview/documentwidget.cpp) -ENDIF (POPPLER_QT4_FOUND) - -# compiled in icons for windows -IF (WIN32 AND MSVC) - SET (TORA_SOURCES ${TORA_SOURCES} tora.rc) -ENDIF (WIN32 AND MSVC) -if (WIN32 AND MINGW) - # resource compilation for mingw - ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/tora_rc.o - COMMAND windres.exe -I${CMAKE_CURRENT_SOURCE_DIR} - -i${CMAKE_CURRENT_SOURCE_DIR}/tora.rc - -o ${CMAKE_CURRENT_BINARY_DIR}/tora_rc.o) - SET(TORA_SOURCES ${TORA_SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/tora_rc.o) -endif (WIN32 AND MINGW) - - - -QT4_ADD_TRANSLATION(TORA_I18N_QM ${TORA_I18N_TS}) -QT4_WRAP_UI(TORA_UI_SOURCES ${TORA_UI_SRC} ) -QT4_WRAP_CPP(TORA_MOC_SOURCES ${TORA_MOC_CLASSES}) -QT4_ADD_RESOURCES(TORA_RCC_SRCS ${TORA_RCC_FILES}) - - -LINK_DIRECTORIES(./loki) -IF (WIN32) - LINK_DIRECTORIES(./windows) -ENDIF (WIN32) -IF (WANT_INTERNAL_QSCINTILLA) - LINK_DIRECTORIES(./qscintilla2) -ENDIF (WANT_INTERNAL_QSCINTILLA) -LINK_DIRECTORIES(./trotl) - -SET(TORA_LOKI_LIB "tora_loki_lib") -IF (WANT_INTERNAL_QSCINTILLA) - SET (TORA_QSCINTILLA_LIB tora_qscintilla2_lib) -ENDIF (WANT_INTERNAL_QSCINTILLA) - - -IF (WIN32) - SET (WINDOWS_LIB "windows_lib") -ENDIF (WIN32) - -SET (TROTL_LIB "trotl") - -IF(USE_TORA_MOC_LIB) - SET (TORA_MOC_LIB "tora_moc_lib") - ADD_LIBRARY(${TORA_MOC_LIB} STATIC ${TORA_MOC_SOURCES} ${TORA_I18N_QM} ${TORA_UI_SOURCES}) -ELSE(USE_TORA_MOC_LIB) - LIST(APPEND TORA_SOURCES ${TORA_MOC_SOURCES} ${TORA_I18N_QM} ${TORA_UI_SOURCES}) -ENDIF(USE_TORA_MOC_LIB) - -INCLUDE_DIRECTORIES( - ${CMAKE_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_BINARY_DIR} - ${QT_INCLUDES} - ${CMAKE_CURRENT_SOURCE_DIR}/loki/include - ${CMAKE_CURRENT_SOURCE_DIR}/otl - ${CMAKE_CURRENT_SOURCE_DIR}/trotl/src - "D:\\DEVEL\\boost_1_46_1" -) - -IF (ORACLE_INCLUDES) - INCLUDE_DIRECTORIES( ${ORACLE_INCLUDES} ) -ENDIF (ORACLE_INCLUDES) - -IF (POSTGRESQL_INCLUDE_DIR) - INCLUDE_DIRECTORIES( ${POSTGRESQL_INCLUDE_DIR} ) -ENDIF (POSTGRESQL_INCLUDE_DIR) - -IF (DB2_INCLUDES) - INCLUDE_DIRECTORIES( ${DB2_INCLUDES} ) -ENDIF (DB2_INCLUDES) - -IF (TERADATA_PATH_INCLUDES) - INCLUDE_DIRECTORIES( ${TERADATA_PATH_INCLUDES} ) -ENDIF (TERADATA_PATH_INCLUDES) - -IF (WANT_INTERNAL_QSCINTILLA) - INCLUDE_DIRECTORIES( - ${CMAKE_SOURCE_DIR}/src/qscintilla2/Qt4 - ${CMAKE_SOURCE_DIR}/src/qscintilla2/Qt4/Qci - ) -ELSE (WANT_INTERNAL_QSCINTILLA) - INCLUDE_DIRECTORIES(${QSCINTILLA_INCLUDE_DIR}) -ENDIF (WANT_INTERNAL_QSCINTILLA) - -IF (POPPLER_QT4_FOUND) - INCLUDE_DIRECTORIES(${POPPLER_QT4_INCLUDE_DIR}) -ENDIF (POPPLER_QT4_FOUND) - -# Handle win/mac special stuff - it's left empty for linux/unix -SET (GUI_TYPE) -IF (APPLE AND WANT_BUNDLE) - SET(GUI_TYPE MACOSX_BUNDLE) - SET(APPLE_BUNDLE_SOURCES icons/tora.icns) -ENDIF (APPLE AND WANT_BUNDLE) - - -IF(WIN32) - IF (MSVC) - # this is a must to switch off subsystem:console (console window poping up) - # WinMain wrapper from QT_QTMAIN_LIBRARY is used and liner must be modified - LINK_LIBRARIES(${QT_QTMAIN_LIBRARY}) - SET (GUI_TYPE WIN32) -# IF (WANT_DEBUG) -# SET (CMAKE_EXE_LINKER_FLAGS "/NODEFAULTLIB:msvcrtd.lib ${CMAKE_EXE_LINKER_FLAGS}") -# ELSE (WANT_DEBUG) -# SET (CMAKE_EXE_LINKER_FLAGS "/NODEFAULTLIB:msvcrt.lib ${CMAKE_EXE_LINKER_FLAGS}") -# ENDIF (WANT_DEBUG) - ENDIF (MSVC) -ENDIF(WIN32) - - -#Set up libraries to link with all found packages -# dynamic -SET(TORA_LIBS - ${QT_LIBRARIES} - ${ORACLE_LIBRARIES} - ${LIBXML2_LIBRARIES} - ${QSCINTILLA_LIBRARIES} - ${TORA_LOKI_LIB} #static -) - -#IF (ORACLE_LIBRARIES) -# TARGET_LINK_LIBRARIES (${EXE_NAME} ${ORACLE_LIBRARIES} ) -#ENDIF (ORACLE_LIBRARIES) - -IF (POSTGRESQL_LIBRARIES) - LIST(APPEND TORA_LIBS ${POSTGRESQL_LIBRARIES}) -ENDIF (POSTGRESQL_LIBRARIES) - -IF (DB2_LIBRARIES) - LIST(APPEND TORA_LIBS} ${DB2_LIBRARIES}) -ENDIF (DB2_LIBRARIES) - -IF (TERADATA_LIBRARIES) - LIST(APPEND TORA_LIBS ${TERADATA_LIBRARIES}) -ENDIF (TERADATA_LIBRARIES) - -IF (USE_TROTL) - LIST(APPEND TORA_LIBS ${TROTL_LIB}) - ADD_DEFINITIONS("-DTROTL_DLL") -ENDIF (USE_TROTL) - -IF (USE_ANTLR) - LIST(APPEND TORA_LIBS "libantlr3c") - LIST(APPEND TORA_SOURCES - "parsing/tsqlparseoracle.cpp" - "parsing/error_handler.c" - "parsing/OracleSQLLexer.c" - "parsing/OracleSQLParser.c" - ) - INCLUDE_DIRECTORIES( - "${CMAKE_CURRENT_SOURCE_DIR}/libantlr3c-3.3/include" - "${CMAKE_CURRENT_BINARY_DIR}/libantlr3c-3.3" - ) -ENDIF(USE_ANTLR) - -IF (POPPLER_QT4_FOUND) - LIST(APPEND TORA_LIBS ${POPPLER_QT4_LIBRARIES}) -ENDIF(POPPLER_QT4_FOUND) - -IF (WANT_INTERNAL_QSCINTILLA) - LIST(APPEND TORA_LIBS ${TORA_QSCINTILLA_LIB} ${QT_LIBRARIES}) -ENDIF (WANT_INTERNAL_QSCINTILLA) -# prevent opening the cmd.exe window -IF (WIN32) - LIST(APPEND TORA_LIBS ${WINDOWS_LIB}) - LIST(APPEND TORA_LIBS "ws2_32.lib") - # don't use console subsystem - IF (MINGW) - LIST(APPEND TORA_LIBS "-mwindows") - ENDIF (MINGW) -ENDIF (WIN32) - -ADD_EXECUTABLE(${EXE_NAME} ${GUI_TYPE} -# ${TORA_I18N_QM} -# ${TORA_MOC_SOURCES} - main.cpp - ${TORA_SOURCES} -# ${TORA_UI_SOURCES} - ${TORA_RCC_SRCS} - ${APPLE_BUNDLE_SOURCES} -) -#SET_TARGET_PROPERTIES(${EXE_NAME} PROPERTIES COMPILE_FLAGS "-DTROTL_DLL") -TARGET_LINK_LIBRARIES(${EXE_NAME} ${TORA_LIBS} ${TORA_MOC_LIB}) - -IF(USE_PCH) -# ADD_PRECOMPILED_HEADER(${EXE_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/precompiled_msvc.h) -ENDIF(USE_PCH) - -# Test programs -ADD_EXECUTABLE(trotl_test0 ${GUI_TYPE} - trotl_test0.cpp - ${TORA_SOURCES} - ${TORA_RCC_SRCS} - ${APPLE_BUNDLE_SOURCES} -) -#SET_TARGET_PROPERTIES(trotl_test0 PROPERTIES COMPILE_FLAGS "-DTROTL_DLL") -TARGET_LINK_LIBRARIES(trotl_test0 ${TORA_LIBS} ${TORA_MOC_LIB}) - -ADD_EXECUTABLE(trotl_test1 ${GUI_TYPE} - trotl_test1.cpp - ${TORA_SOURCES} - ${TORA_RCC_SRCS} - ${APPLE_BUNDLE_SOURCES} -) -#SET_TARGET_PROPERTIES(trotl_test1 PROPERTIES COMPILE_FLAGS "-DTROTL_DLL") -TARGET_LINK_LIBRARIES(trotl_test1 ${TORA_LIBS} ${TORA_MOC_LIB}) - -ADD_EXECUTABLE(trotl_test2 ${GUI_TYPE} - trotl_test2.cpp - ${TORA_SOURCES} - ${TORA_RCC_SRCS} - ${APPLE_BUNDLE_SOURCES} -) -#SET_TARGET_PROPERTIES(trotl_test2 PROPERTIES COMPILE_FLAGS "-DTROTL_DLL") -TARGET_LINK_LIBRARIES(trotl_test2 ${TORA_LIBS} ${TORA_MOC_LIB}) - -QT4_WRAP_CPP(TROTL_TEST3_MOC_SOURCES "trotl_test3.h") -ADD_EXECUTABLE(trotl_test3 ${GUI_TYPE} - trotl_test3.cpp - ${TORA_SOURCES} - ${TORA_RCC_SRCS} - ${APPLE_BUNDLE_SOURCES} - ${TROTL_TEST3_MOC_SOURCES} -) -#SET_TARGET_PROPERTIES(trotl_test3 PROPERTIES COMPILE_FLAGS "-DTROTL_DLL") -TARGET_LINK_LIBRARIES(trotl_test3 ${TORA_LIBS} ${TORA_MOC_LIB}) - -# Install -IF (WIN32) - INSTALL(TARGETS ${EXE_NAME} RUNTIME DESTINATION .) -ELSE (WIN32) - IF (NOT WANT_BUNDLE) - INSTALL(TARGETS ${EXE_NAME} RUNTIME DESTINATION bin LIBRARY DESTINATION lib) - ELSE (NOT WANT_BUNDLE) - - #SET_TARGET_PROPERTIES(${EXE_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_SOURCE_DIR}/osx_tools/Info.plist.in") - SET(MACOSX_BUNDLE_ICON_FILE tora.icns) - SET(MACOSX_BUNDLE_INFO_STRING "${EXE_NAME} ${VERSION}") - SET(MACOSX_BUNDLE_GUI_IDENTIFIER "com.torasql") - SET(MACOSX_BUNDLE_LONG_VERSION_STRING "${VERSION}") - SET(MACOSX_BUNDLE_BUNDLE_NAME "${EXE_NAME}") - SET(MACOSX_BUNDLE_SHORT_VERSION_STRING "${VERSION}") - SET(MACOSX_BUNDLE_BUNDLE_VERSION "${VERSION}") - SET(MACOSX_BUNDLE_COPYRIGHT "(c) TOra developers") - SET_SOURCE_FILES_PROPERTIES(${CMAKE_SOURCE_DIR}/src/icons/tora.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources) - - # Warning: This is dangerous to touch. Except you know what are you doing. - # I ususaly don't know anything about it. But it's working ;) - - INSTALL(TARGETS ${EXE_NAME} BUNDLE DESTINATION ${CMAKE_INSTALL_PREFIX}) - - IF (WANT_BUNDLE_STANDALONE) - # --- If we are on OS X copy all the embedded libraries to the app bundle - # -------- Function to build OS X Stand Alone Bundles ----------------- - function(MakeOSXBundleApp target binary_dir) - #-- Set some useful variables - SET (OSX_MAKE_STANDALONE_BUNDLE_CMAKE_SCRIPT "${binary_dir}/${target}_OSX_MakeStandAloneBundle.cmake") - SET (OSX_MAKE_STANDALONE_BUNDLE_BASH_SCRIPT "${binary_dir}/${target}_OSX_MakeStandAloneBundle.sh") - #-- Configure the cmake file and the shell script - CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/osx_tools/CompleteBundle.cmake.in" - "${OSX_MAKE_STANDALONE_BUNDLE_CMAKE_SCRIPT}" @ONLY IMMEDIATE) - CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/osx_tools/CreateBundle.sh.in" - "${OSX_MAKE_STANDALONE_BUNDLE_BASH_SCRIPT}" @ONLY IMMEDIATE) - #-- Create the installation code - install(SCRIPT "${OSX_MAKE_STANDALONE_BUNDLE_CMAKE_SCRIPT}") - endfunction(MakeOSXBundleApp) - - - install(DIRECTORY ${QT_PLUGINS_DIR}/ - DESTINATION ${PROJECT_BINARY_DIR}/Contents/Plugins/ - REGEX "(designer|script|phonon_backend|debug|sqlite|ico)" EXCLUDE) - - install(CODE " - # glob for previously installed qt plugins to include in fixup_bundle - file(GLOB_RECURSE PluginList - ${PROJECT_BINARY_DIR}/Contents/Plugins/*.bundle) - ") - - MakeOSXBundleApp(${EXE_NAME} ${PROJECT_BINARY_DIR}) - - # TODO/FIXME: this is evil! And it should be done automagically... - set(hack_bundle_pth "${CMAKE_INSTALL_PREFIX}/${EXE_NAME}.app/Contents/MacOS") - INSTALL(CODE "file(MAKE_DIRECTORY ${hack_bundle_pth}/sqldrivers)") - INSTALL(CODE "file(MAKE_DIRECTORY ${hack_bundle_pth}/codecs)") - INSTALL(CODE "file(MAKE_DIRECTORY ${hack_bundle_pth}/accessible)") - INSTALL(CODE "file(MAKE_DIRECTORY ${hack_bundle_pth}/imageformats)") - INSTALL(CODE "file(MAKE_DIRECTORY ${hack_bundle_pth}/graphicssystems)") - function(hack_move_plugins filename targetdir) - install(CODE " - message(STATUS \"file:: ${filename} -> targetdir: ${targetdir} ${hack_bundle_pth}\") - ") - install(FILES ${hack_bundle_pth}/${filename} DESTINATION ${hack_bundle_pth}/${targetdir}) - install(CODE "file(REMOVE ${hack_bundle_pth}/${filename})") - endfunction(hack_move_plugins) - hack_move_plugins("libqcncodecs.bundle" "codecs") - hack_move_plugins("libqjpcodecs.bundle" "codecs") - hack_move_plugins("libqtwcodecs.bundle" "codecs") - hack_move_plugins("libqkrcodecs.bundle" "codecs") - hack_move_plugins("libqsqlmysql.bundle" "sqldrivers") - hack_move_plugins("libqsqlodbc.bundle" "sqldrivers") - hack_move_plugins("libqsqlpsql.bundle" "sqldrivers") - hack_move_plugins("libqgif.bundle" "imageformats") - hack_move_plugins("libqjpeg.bundle" "imageformats") - hack_move_plugins("libqmng.bundle" "imageformats") - hack_move_plugins("libqsvg.bundle" "imageformats") - hack_move_plugins("libqtiff.bundle" "imageformats") - hack_move_plugins("libqtaccessiblewidgets.bundle" "accessible") - hack_move_plugins("libqtaccessiblecompatwidgets.bundle" "accessible") - hack_move_plugins("libqglgraphicssystem.bundle" "graphicssystems") - # end of hack - - #-- Put an empty qt.conf file in the bundle so as to NOT load plugins from the installed Qt. - INSTALL(CODE "message(STATUS \"${CMAKE_INSTALL_PREFIX}/${EXE_NAME}.app/Contents/Resources/qt.conf\")") - INSTALL(FILES "${CMAKE_SOURCE_DIR}/osx_tools/qt.conf.in" - DESTINATION "${CMAKE_INSTALL_PREFIX}/${EXE_NAME}.app/Contents/Resources/" - RENAME "qt.conf") - - if ("${QT_MAC_USE_COCOA}" STREQUAL "1") - INSTALL(CODE "message(STATUS \"Copying qt_menu.nib into ${CMAKE_INSTALL_PREFIX}/${EXE_NAME}.app/Contents/Resources\")") - INSTALL(CODE "file(MAKE_DIRECTORY \"${CMAKE_INSTALL_PREFIX}/${EXE_NAME}.app/Contents/Resources/qt_menu.nib\")") - INSTALL(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory - \"${QT_LIBRARY_DIR}/QtGui.framework/Resources/qt_menu.nib\" - \"${CMAKE_INSTALL_PREFIX}/${EXE_NAME}.app/Contents/Resources/qt_menu.nib\")") - endif() - ENDIF (WANT_BUNDLE_STANDALONE) - - ENDIF (NOT WANT_BUNDLE) -ENDIF (WIN32) +INCLUDE(ToraCompat) +INCLUDE(PCHSupport_26) + +#Subdirectories +# ADD_SUBDIRECTORY(i18n) +ADD_SUBDIRECTORY(loki) +IF (WIN32) + ADD_SUBDIRECTORY(windows) +ENDIF (WIN32) + +ADD_SUBDIRECTORY(trotl) +ADD_SUBDIRECTORY(libantlr3c-3.3) + +# Default: qsci2 as 3rd party lib! +IF (WANT_INTERNAL_QSCINTILLA) + ADD_SUBDIRECTORY(qscintilla2) +ENDIF(WANT_INTERNAL_QSCINTILLA) + +# only toad bindings are here. All others qm files will blow the binary too much +SET (TORA_I18N_TS + i18n/tora_toad.ts +) + +SET(TORA_RCC_FILES tora.qrc) + +SET(TORA_UI_SRC + toaboutui.ui + tobrowserconstraintui.ui + tobrowserfilterui.ui + tobrowserindexui.ui + tobrowsertableui.ui + toconnectionimportui.ui + todatabasesettingui.ui + todebugchangeui.ui + todebugwatch.ui + todescribeui.ui + todroptablespaceui.ui + toeditextensionsetupui.ui + toglobalsettingui.ui + tohelpaddfileui.ui + tohelpui.ui + tohelpsetupui.ui + tochartalarmui.ui + tochartsetupui.ui + tolinechartsetupui.ui + tomessageui.ui + tonewconnectionui.ui + topreferencesui.ui + toresultcontentfilterui.ui + toresultlistformatui.ui + torollbackdialogui.ui +# toschedulerui.ui + toscriptui.ui + toscriptschemawidgetui.ui + tosearchreplaceui.ui + tosecurityquotaui.ui + tosecurityroleui.ui + tosecurityuserui.ui + tostoragedatafileui.ui + tostoragedefinitionui.ui + tostoragedialogui.ui + tostorageprefsui.ui + tostoragetablespaceui.ui + tosyntaxsetupui.ui + totemplateaddfileui.ui + totemplateeditui.ui + totemplatesetupui.ui + totoolsettingui.ui + totuningoverviewui.ui + totuningsettingui.ui + toworksheetsetupui.ui + # shortcuteditor + shortcuteditor/shortcuteditordialog.ui + connectioncolorsdialogui.ui +) +IF (ORACLE_FOUND) + LIST (APPEND TORA_UI_SRC tooraclesettingui.ui) +ENDIF (ORACLE_FOUND) + +IF (POPPLER_QT4_FOUND) + LIST(APPEND TORA_UI_SRC pdfview/pdfviewwidget.ui) +ENDIF (POPPLER_QT4_FOUND) + +SET(TORA_MOC_CLASSES + toabout.h + toalert.h + toanalyze.h + toawr.h + tobackground.h + tobackgroundlabel.h + tobackup.h +# tobackuptool.h + tobarchart.h + tobrowserconstraint.h + tobrowser.h + toresultgrants.h + tobrowserindex.h + tobrowsertable.h + tobrowserbasewidget.h + tobrowseraccesswidget.h + tobrowsertablewidget.h + tobrowserviewwidget.h + tobrowserindexwidget.h + tobrowserschemawidget.h + tobrowsersequencewidget.h + tobrowsersynonymwidget.h + tobrowsercodewidget.h + tobrowsertriggerwidget.h + tobrowserdblinkswidget.h + tobrowserdirectorieswidget.h +# tobrowserschemabasewidget.h +# toconf.h +# toconfiguration.h + toconnection.h + toquery.h + #tocache.h + toconnectionimport.h + toconnectionmodel.h + toconnectionpool.h + todocklet.h + todockbar.h + topushbutton.h + torunnable.h + tocurrent.h + todatatype.h + todebug.h + todebugtext.h + todescribe.h +# todefaultkeywords.h + toeditextensions.h +# toeditwidget.h +# toextract.h + toeventquery.h + toeventquerytask.h + tofilesize.h + toglobalsetting.h + tohelp.h + tohelpsetup.h + tohighlightedtext.h +# tohtml.h + tochangeconnection.h + tochartmanager.h + toinvalid.h + tolegendchart.h + tolinechart.h +# tolistviewformattercsv.h +# tolistviewformatterfactory.h +# tolistviewformatter.h +# tolistviewformatterhtml.h +# tolistviewformatteridentifier.h +# tolistviewformattersql.h +# tolistviewformattertabdel.h +# tolistviewformattertext.h + tomain.h + tomainwindow.h +# tomainwindow.kde.h + tomarkedtext.h + tomemoeditor.h + tomodeleditor.h + tomessage.h +# tomysqlkeywords.h + tonewconnection.h + tooutput.h + toparamget.h + topiechart.h + toplsqleditor.h + toplsqltext.h + topreferences.h + toprofiler.h + toproject.h +# toqvalue.h +# toreport.h + toresultbar.h + toresultcolscomment.h + toresultcols.h + toresultcombo.h + toresultschema.h + toresultdepend.h + toresultextract.h + toresultfield.h + toresult.h + toresultitem.h + toresultlabel.h + toresultline.h + toresultlock.h + toresultlong.h + toresultmodel.h + tocodemodel.h + toresultparam.h + toresultpie.h + toresultplan.h +# toresultresources.h + toresultstats.h + toresultstorage.h + toresulttableview.h + toresulttableviewedit.h + toresultdata.h + toresultdatasingle.h + toresultview.h + toresultlistformat.h + torollback.h +# toscheduler.h + toscript.h + toscriptschemawidget.h +# toscripttreeitem.h + toscripttreemodel.h + tosearchreplace.h + tosecurity.h + tosecuritytreemodel.h +# tosecuritytreeitem.h + tosession.h + tosgastatement.h + tosgatrace.h + tosmtp.h +# tosplash.h + tosqledit.h +# tosql.h +# tosqlparse.h +# tostoragedefinition.h + tostorage.h + tosyntaxsetup.h + totableselect.h + totabwidget.h + totemplate.h + totemporary.h +# totextview.h + tothread_p.h + totreewidget.h +# totimer.h + totool.h + totuning.h + tounittest.h + tovisualize.h + towaitevents.h + toworksheet.h + toworkingwidget.h + toeditablemenu.h + toworksheetstatistic.h +# toworksheettext.h + toworksheetwidget.h + utils.h +# shortcuteditor + shortcuteditor/shortcuteditordialog.h + shortcuteditor/shortcutmodel.h +# docklets + docklets/toviewconnections.h + docklets/toviewdirectory.h +# +) +IF (ORACLE_FOUND) + LIST(APPEND TORA_MOC_CLASSES tooraclesetting.h) +ENDIF (ORACLE_FOUND) + +IF (POPPLER_QT4_FOUND) + LIST(APPEND TORA_MOC_CLASSES pdfview/documentwidget.h pdfview/pdfviewwidget.h) +ENDIF (POPPLER_QT4_FOUND) + +SET(TORA_SOURCES +# main.cpp + totool.cpp + totemplateprovider.cpp + topreferences.cpp + tomain.cpp + + #tosqlparsetest.cpp + toabout.cpp + toalert.cpp + toanalyze.cpp + toawr.cpp + tobackground.cpp + tobackgroundlabel.cpp + tobackup.cpp + tobackuptool.cpp + tobarchart.cpp + tobrowserconstraint.cpp + tobrowser.cpp + toresultgrants.cpp + tobrowserindex.cpp + tobrowsertable.cpp + tobrowserbasewidget.cpp + tobrowseraccesswidget.cpp + tobrowsertablewidget.cpp + tobrowserviewwidget.cpp + tobrowserindexwidget.cpp + tobrowserschemawidget.cpp + tobrowsersequencewidget.cpp + tobrowsersynonymwidget.cpp + tobrowsercodewidget.cpp + tobrowsertriggerwidget.cpp + tobrowserdblinkswidget.cpp + tobrowserdirectorieswidget.cpp +# tobrowserschemabasewidget.cpp + tocache.cpp + toconfiguration.cpp + toconnection.cpp + toquery.cpp + toqvalue.cpp + toconnectionimport.cpp + toconnectionmodel.cpp + toconnectionpool.cpp + todocklet.cpp + todockbar.cpp + topushbutton.cpp + torunnable.cpp + tocurrent.cpp + todatatype.cpp + todebug.cpp + todebugtext.cpp + todescribe.cpp + toeditextensions.cpp + toeditwidget.cpp + toextract.cpp + toextratranslations.cpp + toeventquery.cpp + toeventquerytask.cpp + tofilesize.cpp +# temporarily disabled due the lack of firebird here tofyracleconnection.cpp + toglobalsetting.cpp + tohelp.cpp + tohighlightedtext.cpp + tohtml.cpp + tochangeconnection.cpp + tochartmanager.cpp + toinvalid.cpp + tolegendchart.cpp + tolinechart.cpp + tolistviewformatter.cpp + tolistviewformattercsv.cpp + tolistviewformatterhtml.cpp + tolistviewformattersql.cpp + tolistviewformattertabdel.cpp + tolistviewformattertext.cpp + tomainwindow.cpp + tomarkedtext.cpp + tomemoeditor.cpp + tomodeleditor.cpp + tomessage.cpp + tonewconnection.cpp +#win only? toocistub.cpp + tooracleconnection_trotl.cpp + tooracleextract.cpp + tooraclepreload.cpp + tooutput.cpp + toparamget.cpp + topassword.cpp + topiechart.cpp + toplsqleditor.cpp + toplsqltext.cpp + toprofiler.cpp + toproject.cpp + toqsqlconnection.cpp + toreport.cpp + toresultbar.cpp + toresultcolscomment.cpp + toresultcols.cpp + toresultschema.cpp + toresultcombo.cpp + toresult.cpp + toresultdepend.cpp + toresultextract.cpp + toresultfield.cpp + toresultitem.cpp + toresultlabel.cpp + toresultline.cpp + toresultlock.cpp + toresultlong.cpp + toresultmodel.cpp + tocodemodel.cpp + toresultparam.cpp + toresultpie.cpp + toresultplan.cpp + toresultstats.cpp + toresultstorage.cpp + toresulttableview.cpp + toresulttableviewedit.cpp + toresultdata.cpp + toresultdatasingle.cpp + toresultview.cpp + toresultlistformat.cpp + torollback.cpp +# toscheduler.cpp + toscript.cpp + toscriptschemawidget.cpp + toscripttreeitem.cpp + toscripttreemodel.cpp + tosearchreplace.cpp + tosecurity.cpp + tosecuritytreemodel.cpp + tosecuritytreeitem.cpp + tosession.cpp + tosgastatement.cpp + tosgatrace.cpp + tosmtp.cpp + tosplash.cpp + tosql.cpp + tosqledit.cpp + tosqlparse.cpp + tostorage.cpp + tostoragedefinition.cpp + tosyntaxsetup.cpp + totableselect.cpp + totabwidget.cpp + totemplate.cpp + totemporary.cpp + totextview.cpp + tothread.cpp + totimer.cpp + totreewidget.cpp + totuning.cpp + tounittest.cpp + tovisualize.cpp + towaitevents.cpp + toworksheet.cpp + toworkingwidget.cpp + toeditablemenu.cpp + toworksheetstatistic.cpp + toworksheettext.cpp + toworksheetwidget.cpp + utils.cpp + # + migratetool/sqldeveloper.cpp + migratetool/squirrelsql.cpp + migratetool/tora3.cpp + # shortcuteditor + shortcuteditor/shortcuteditordialog.cpp + shortcuteditor/shortcutmodel.cpp + # docklets + docklets/toviewconnections.cpp + docklets/toviewdirectory.cpp + # + tooracletable.cpp +) + + +IF (DB2_FOUND) + LIST (APPEND TORA_SOURCES db2/todb2connection.cpp + db2/db2connectionsub.cpp + db2/db2provider.cpp + db2/db2query.cpp) + #db2/qsql_db2.cpp) +ENDIF (DB2_FOUND) + +IF (TERADATA_FOUND) + LIST (APPEND TORA_SOURCES toteradataconnection.cpp) +ENDIF (TERADATA_FOUND) + +IF (POPPLER_QT4_FOUND) + LIST(APPEND TORA_SOURCES pdfview/pdfviewwidget.cpp pdfview/documentwidget.cpp) +ENDIF (POPPLER_QT4_FOUND) + +# compiled in icons for windows +IF (WIN32 AND MSVC) + SET (TORA_SOURCES ${TORA_SOURCES} tora.rc) +ENDIF (WIN32 AND MSVC) +if (WIN32 AND MINGW) + # resource compilation for mingw + ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/tora_rc.o + COMMAND windres.exe -I${CMAKE_CURRENT_SOURCE_DIR} + -i${CMAKE_CURRENT_SOURCE_DIR}/tora.rc + -o ${CMAKE_CURRENT_BINARY_DIR}/tora_rc.o) + SET(TORA_SOURCES ${TORA_SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/tora_rc.o) +endif (WIN32 AND MINGW) + + + +QT4_ADD_TRANSLATION(TORA_I18N_QM ${TORA_I18N_TS}) +QT4_WRAP_UI(TORA_UI_SOURCES ${TORA_UI_SRC} ) +QT4_WRAP_CPP(TORA_MOC_SOURCES ${TORA_MOC_CLASSES}) +QT4_ADD_RESOURCES(TORA_RCC_SRCS ${TORA_RCC_FILES}) + + +LINK_DIRECTORIES(./loki) +IF (WIN32) + LINK_DIRECTORIES(./windows) +ENDIF (WIN32) +IF (WANT_INTERNAL_QSCINTILLA) + LINK_DIRECTORIES(./qscintilla2) +ENDIF (WANT_INTERNAL_QSCINTILLA) +LINK_DIRECTORIES(./trotl) + +SET(TORA_LOKI_LIB "tora_loki_lib") +IF (WANT_INTERNAL_QSCINTILLA) + SET (TORA_QSCINTILLA_LIB tora_qscintilla2_lib) +ENDIF (WANT_INTERNAL_QSCINTILLA) + + +IF (WIN32) + SET (WINDOWS_LIB "windows_lib") +ENDIF (WIN32) + +SET (TROTL_LIB "trotl") + +IF(USE_TORA_MOC_LIB) + SET (TORA_MOC_LIB "tora_moc_lib") + ADD_LIBRARY(${TORA_MOC_LIB} STATIC ${TORA_MOC_SOURCES} ${TORA_I18N_QM} ${TORA_UI_SOURCES}) +ELSE(USE_TORA_MOC_LIB) + LIST(APPEND TORA_SOURCES ${TORA_MOC_SOURCES} ${TORA_I18N_QM} ${TORA_UI_SOURCES}) +ENDIF(USE_TORA_MOC_LIB) + +INCLUDE_DIRECTORIES( + ${CMAKE_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_BINARY_DIR} + ${QT_INCLUDES} + ${CMAKE_CURRENT_SOURCE_DIR}/loki/include + ${CMAKE_CURRENT_SOURCE_DIR}/otl + ${CMAKE_CURRENT_SOURCE_DIR}/trotl/src + "D:\\DEVEL\\boost_1_46_1" +) + +IF (ORACLE_INCLUDES) + INCLUDE_DIRECTORIES( ${ORACLE_INCLUDES} ) +ENDIF (ORACLE_INCLUDES) + +IF (POSTGRESQL_INCLUDE_DIR) + INCLUDE_DIRECTORIES( ${POSTGRESQL_INCLUDE_DIR} ) +ENDIF (POSTGRESQL_INCLUDE_DIR) + +IF (DB2_INCLUDES) + INCLUDE_DIRECTORIES( ${DB2_INCLUDES} ) +ENDIF (DB2_INCLUDES) + +IF (TERADATA_PATH_INCLUDES) + INCLUDE_DIRECTORIES( ${TERADATA_PATH_INCLUDES} ) +ENDIF (TERADATA_PATH_INCLUDES) + +IF (WANT_INTERNAL_QSCINTILLA) + INCLUDE_DIRECTORIES( + ${CMAKE_SOURCE_DIR}/src/qscintilla2/Qt4 + ${CMAKE_SOURCE_DIR}/src/qscintilla2/Qt4/Qci + ) +ELSE (WANT_INTERNAL_QSCINTILLA) + INCLUDE_DIRECTORIES(${QSCINTILLA_INCLUDE_DIR}) +ENDIF (WANT_INTERNAL_QSCINTILLA) + +IF (POPPLER_QT4_FOUND) + INCLUDE_DIRECTORIES(${POPPLER_QT4_INCLUDE_DIR}) +ENDIF (POPPLER_QT4_FOUND) + +# Handle win/mac special stuff - it's left empty for linux/unix +SET (GUI_TYPE) +IF (APPLE AND WANT_BUNDLE) + SET(GUI_TYPE MACOSX_BUNDLE) + SET(APPLE_BUNDLE_SOURCES icons/tora.icns) +ENDIF (APPLE AND WANT_BUNDLE) + + +IF(WIN32) + IF (MSVC) + # this is a must to switch off subsystem:console (console window poping up) + # WinMain wrapper from QT_QTMAIN_LIBRARY is used and liner must be modified + LINK_LIBRARIES(${QT_QTMAIN_LIBRARY}) + SET (GUI_TYPE WIN32) +# IF (WANT_DEBUG) +# SET (CMAKE_EXE_LINKER_FLAGS "/NODEFAULTLIB:msvcrtd.lib ${CMAKE_EXE_LINKER_FLAGS}") +# ELSE (WANT_DEBUG) +# SET (CMAKE_EXE_LINKER_FLAGS "/NODEFAULTLIB:msvcrt.lib ${CMAKE_EXE_LINKER_FLAGS}") +# ENDIF (WANT_DEBUG) + ENDIF (MSVC) +ENDIF(WIN32) + + +#Set up libraries to link with all found packages +# dynamic +SET(TORA_LIBS + ${QT_LIBRARIES} + ${ORACLE_LIBRARIES} + ${LIBXML2_LIBRARIES} + ${QSCINTILLA_LIBRARIES} + ${TORA_LOKI_LIB} #static +) + +#IF (ORACLE_LIBRARIES) +# TARGET_LINK_LIBRARIES (${EXE_NAME} ${ORACLE_LIBRARIES} ) +#ENDIF (ORACLE_LIBRARIES) + +IF (POSTGRESQL_LIBRARIES) + LIST(APPEND TORA_LIBS ${POSTGRESQL_LIBRARIES}) +ENDIF (POSTGRESQL_LIBRARIES) + +IF (DB2_LIBRARIES) + LIST(APPEND TORA_LIBS} ${DB2_LIBRARIES}) +ENDIF (DB2_LIBRARIES) + +IF (TERADATA_LIBRARIES) + LIST(APPEND TORA_LIBS ${TERADATA_LIBRARIES}) +ENDIF (TERADATA_LIBRARIES) + +IF (USE_TROTL) + LIST(APPEND TORA_LIBS ${TROTL_LIB}) + ADD_DEFINITIONS("-DTROTL_DLL") +ENDIF (USE_TROTL) + +IF (USE_ANTLR) + LIST(APPEND TORA_LIBS "libantlr3c") + LIST(APPEND TORA_SOURCES + "parsing/tsqlparseoracle.cpp" + "parsing/error_handler.c" + "parsing/OracleSQLLexer.c" + "parsing/OracleSQLParser.c" + ) + INCLUDE_DIRECTORIES( + "${CMAKE_CURRENT_SOURCE_DIR}/libantlr3c-3.3/include" + "${CMAKE_CURRENT_BINARY_DIR}/libantlr3c-3.3" + ) +ENDIF(USE_ANTLR) + +IF (POPPLER_QT4_FOUND) + LIST(APPEND TORA_LIBS ${POPPLER_QT4_LIBRARIES}) +ENDIF(POPPLER_QT4_FOUND) + +IF (WANT_INTERNAL_QSCINTILLA) + LIST(APPEND TORA_LIBS ${TORA_QSCINTILLA_LIB} ${QT_LIBRARIES}) +ENDIF (WANT_INTERNAL_QSCINTILLA) +# prevent opening the cmd.exe window +IF (WIN32) + LIST(APPEND TORA_LIBS ${WINDOWS_LIB}) + LIST(APPEND TORA_LIBS "ws2_32.lib") + # don't use console subsystem + IF (MINGW) + LIST(APPEND TORA_LIBS "-mwindows") + ENDIF (MINGW) +ENDIF (WIN32) + +ADD_EXECUTABLE(${EXE_NAME} ${GUI_TYPE} +# ${TORA_I18N_QM} +# ${TORA_MOC_SOURCES} + main.cpp + ${TORA_SOURCES} +# ${TORA_UI_SOURCES} + ${TORA_RCC_SRCS} + ${APPLE_BUNDLE_SOURCES} +) +#SET_TARGET_PROPERTIES(${EXE_NAME} PROPERTIES COMPILE_FLAGS "-DTROTL_DLL") +TARGET_LINK_LIBRARIES(${EXE_NAME} ${TORA_LIBS} ${TORA_MOC_LIB}) + +IF(USE_PCH) +# ADD_PRECOMPILED_HEADER(${EXE_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/precompiled_msvc.h) +ENDIF(USE_PCH) + +# Test programs +ADD_EXECUTABLE(trotl_test0 ${GUI_TYPE} + trotl_test0.cpp + ${TORA_SOURCES} + ${TORA_RCC_SRCS} + ${APPLE_BUNDLE_SOURCES} +) +#SET_TARGET_PROPERTIES(trotl_test0 PROPERTIES COMPILE_FLAGS "-DTROTL_DLL") +TARGET_LINK_LIBRARIES(trotl_test0 ${TORA_LIBS} ${TORA_MOC_LIB}) + +ADD_EXECUTABLE(trotl_test1 ${GUI_TYPE} + trotl_test1.cpp + ${TORA_SOURCES} + ${TORA_RCC_SRCS} + ${APPLE_BUNDLE_SOURCES} +) +#SET_TARGET_PROPERTIES(trotl_test1 PROPERTIES COMPILE_FLAGS "-DTROTL_DLL") +TARGET_LINK_LIBRARIES(trotl_test1 ${TORA_LIBS} ${TORA_MOC_LIB}) + +ADD_EXECUTABLE(trotl_test2 ${GUI_TYPE} + trotl_test2.cpp + ${TORA_SOURCES} + ${TORA_RCC_SRCS} + ${APPLE_BUNDLE_SOURCES} +) +#SET_TARGET_PROPERTIES(trotl_test2 PROPERTIES COMPILE_FLAGS "-DTROTL_DLL") +TARGET_LINK_LIBRARIES(trotl_test2 ${TORA_LIBS} ${TORA_MOC_LIB}) + +QT4_WRAP_CPP(TROTL_TEST3_MOC_SOURCES "trotl_test3.h") +ADD_EXECUTABLE(trotl_test3 ${GUI_TYPE} + trotl_test3.cpp + ${TORA_SOURCES} + ${TORA_RCC_SRCS} + ${APPLE_BUNDLE_SOURCES} + ${TROTL_TEST3_MOC_SOURCES} +) +#SET_TARGET_PROPERTIES(trotl_test3 PROPERTIES COMPILE_FLAGS "-DTROTL_DLL") +TARGET_LINK_LIBRARIES(trotl_test3 ${... [truncated message content] |