Skip to content
Browse files

test

  • Loading branch information...
1 parent 9443a87 commit 3793a1150f42c29ede00fada8e56c408719b74db @ReluctantX committed Apr 20, 2012
Showing with 0 additions and 27,866 deletions.
  1. +0 −16 .gitattributes
  2. +0 −16 .gitignore
  3. +0 −70 CMakeLists.txt
  4. +0 −339 COPYING
  5. +0 −23 PreLoad.cmake
  6. 0 README
  7. +0 −76 THANKS
  8. +0 −24 cmake/compiler/gcc/settings.cmake
  9. +0 −21 cmake/compiler/icc/settings.cmake
  10. +0 −52 cmake/compiler/msvc/settings.cmake
  11. +0 −2 cmake/compiler/xcode/settings.cmake
  12. +0 −82 cmake/genrev.cmake
  13. +0 −23 cmake/macros/CheckBuildDir.cmake
  14. +0 −18 cmake/macros/CheckPlatform.cmake
  15. +0 −115 cmake/macros/EnsureVersion.cmake
  16. +0 −65 cmake/macros/FindACE.cmake
  17. +0 −176 cmake/macros/FindMySQL.cmake
  18. +0 −180 cmake/macros/FindOpenSSL.cmake
  19. +0 −315 cmake/macros/FindPCHSupport.cmake
  20. +0 −18 cmake/macros/FindReadline.cmake
  21. +0 −17 cmake/options.cmake
  22. +0 −23 cmake/platform/cmake_uninstall.in.cmake
  23. +0 −31 cmake/platform/osx/settings.cmake
  24. +0 −5 cmake/platform/settings.cmake
  25. +0 −38 cmake/platform/unix/settings.cmake
  26. +0 −28 cmake/platform/win/settings.cmake
  27. +0 −80 cmake/showoptions.cmake
  28. +0 −20 contrib/ScriptsConverter/ScriptConverter.sln
  29. +0 −226 contrib/ScriptsConverter/ScriptConverter/Program.cs
  30. +0 −36 contrib/ScriptsConverter/ScriptConverter/Properties/AssemblyInfo.cs
  31. +0 −59 contrib/ScriptsConverter/ScriptConverter/ScriptConverter.csproj
  32. +0 −6 contrib/ScriptsConverter/ScriptConverter/ScriptConverter.csproj.user
  33. +0 −2 contrib/cleanup/tab2spaces.sh
  34. +0 −2 contrib/cleanup/whitespace.sh
  35. +0 −13 contrib/conf_merge/README
  36. +0 −40 contrib/conf_merge/index.php
  37. +0 −159 contrib/conf_merge/merge.php
  38. +0 −43 contrib/conf_merge/tc-conf-merger.pl
  39. +0 −13 contrib/debugger/README
  40. +0 −18 contrib/debugger/crashreport.gdb
  41. +0 −44 dep/CMakeLists.txt
  42. +0 −41 dep/PackageList.txt
  43. +0 −355 dep/SFMT/SFMT.h
  44. +0 −65 dep/SFMT/randomc.h
  45. +0 −13 dep/acelite/AUTHORS
  46. +0 −11 dep/acelite/CMakeLists.txt
  47. +0 −111 dep/acelite/COPYING
  48. +0 −3,020 dep/acelite/ChangeLog
  49. +0 −1,670 dep/acelite/NEWS
  50. +0 −222 dep/acelite/README
  51. +0 −2,369 dep/acelite/THANKS
  52. +0 −8 dep/acelite/VERSION
  53. +0 −3,494 dep/acelite/ace/ACE.cpp
  54. +0 −869 dep/acelite/ace/ACE.h
  55. +0 −333 dep/acelite/ace/ACE.inl
  56. +0 −156 dep/acelite/ace/ACE_crc32.cpp
  57. +0 −124 dep/acelite/ace/ACE_crc_ccitt.cpp
  58. +0 −74 dep/acelite/ace/ACE_export.h
  59. +0 −381 dep/acelite/ace/ARGV.cpp
  60. +0 −333 dep/acelite/ace/ARGV.h
  61. +0 −104 dep/acelite/ace/ARGV.inl
  62. +0 −309 dep/acelite/ace/ATM_Acceptor.cpp
  63. +0 −123 dep/acelite/ace/ATM_Acceptor.h
  64. +0 −43 dep/acelite/ace/ATM_Acceptor.inl
  65. +0 −522 dep/acelite/ace/ATM_Addr.cpp
  66. +0 −197 dep/acelite/ace/ATM_Addr.h
  67. +0 −37 dep/acelite/ace/ATM_Addr.inl
  68. +0 −138 dep/acelite/ace/ATM_Connector.cpp
  69. +0 −164 dep/acelite/ace/ATM_Connector.h
  70. +0 −132 dep/acelite/ace/ATM_Connector.inl
  71. +0 −20 dep/acelite/ace/ATM_Params.cpp
  72. +0 −214 dep/acelite/ace/ATM_Params.h
  73. +0 −235 dep/acelite/ace/ATM_Params.inl
  74. +0 −631 dep/acelite/ace/ATM_QoS.cpp
  75. +0 −115 dep/acelite/ace/ATM_QoS.h
  76. +0 −29 dep/acelite/ace/ATM_QoS.inl
  77. +0 −288 dep/acelite/ace/ATM_Stream.cpp
  78. +0 −107 dep/acelite/ace/ATM_Stream.h
  79. +0 −133 dep/acelite/ace/ATM_Stream.inl
  80. +0 −1,243 dep/acelite/ace/Acceptor.cpp
  81. +0 −695 dep/acelite/ace/Acceptor.h
  82. +0 −136 dep/acelite/ace/Activation_Queue.cpp
  83. +0 −168 dep/acelite/ace/Activation_Queue.h
  84. +0 −31 dep/acelite/ace/Activation_Queue.inl
  85. +0 −7 dep/acelite/ace/Active_Map_Manager.cpp
  86. +0 −116 dep/acelite/ace/Active_Map_Manager.h
  87. +0 −95 dep/acelite/ace/Active_Map_Manager.inl
  88. +0 −22 dep/acelite/ace/Active_Map_Manager_T.cpp
  89. +0 −211 dep/acelite/ace/Active_Map_Manager_T.h
  90. +0 −311 dep/acelite/ace/Active_Map_Manager_T.inl
  91. +0 −67 dep/acelite/ace/Addr.cpp
  92. +0 −103 dep/acelite/ace/Addr.h
  93. +0 −57 dep/acelite/ace/Addr.inl
  94. +0 −226 dep/acelite/ace/Arg_Shifter.cpp
  95. +0 −234 dep/acelite/ace/Arg_Shifter.h
  96. +0 −192 dep/acelite/ace/Argv_Type_Converter.cpp
  97. +0 −119 dep/acelite/ace/Argv_Type_Converter.h
  98. +0 −44 dep/acelite/ace/Argv_Type_Converter.inl
  99. +0 −235 dep/acelite/ace/Array_Base.cpp
  100. +0 −256 dep/acelite/ace/Array_Base.h
  101. +0 −146 dep/acelite/ace/Array_Base.inl
  102. +0 −299 dep/acelite/ace/Array_Map.cpp
  103. +0 −300 dep/acelite/ace/Array_Map.h
  104. +0 −133 dep/acelite/ace/Array_Map.inl
  105. +0 −22 dep/acelite/ace/Assert.cpp
  106. +0 −40 dep/acelite/ace/Assert.h
  107. +0 −505 dep/acelite/ace/Asynch_Acceptor.cpp
  108. +0 −276 dep/acelite/ace/Asynch_Acceptor.h
  109. +0 −270 dep/acelite/ace/Asynch_Connector.cpp
  110. +0 −171 dep/acelite/ace/Asynch_Connector.h
  111. +0 −1,412 dep/acelite/ace/Asynch_IO.cpp
Sorry, we could not display the entire diff because too many files (6,494) changed.
View
16 .gitattributes
@@ -1,16 +0,0 @@
-# Lineendings
-*.sln eol=crlf
-*.vcproj eol=crlf
-*.vcxproj* eol=crlf
-
-# Whitespace rules
-# strict (no trailing, no tabs)
-*.cpp whitespace=trailing-space,space-before-tab,tab-in-indent,cr-at-eol
-*.h whitespace=trailing-space,space-before-tab,tab-in-indent,cr-at-eol
-
-# normal (no trailing)
-*.sql whitespace=trailing-space,space-before-tab,cr-at-eol
-*.txt whitespace=trailing-space,space-before-tab,cr-at-eol
-
-# special files which must ignore whitespace
-*.patch whitespace=-trailing-space
View
16 .gitignore
@@ -1,16 +0,0 @@
-
-build*/
-.directory
-.mailmap
-*.orig
-*.rej
-*~
-.hg/
-*.kdev*
-*.bak
-*.patch
-*.diff
-*.REMOTE.*
-*.BACKUP.*
-*.BASE.*
-*.LOCAL.*
View
70 CMakeLists.txt
@@ -1,70 +0,0 @@
-# Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
-#
-# This file is free software; as a special exception the author gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-# Set projectname (must be done AFTER setting configurationtypes)
-project(TrinityCore)
-
-# CMake policies (can not be handled elsewhere)
-cmake_minimum_required(VERSION 2.6)
-cmake_policy(SET CMP0005 OLD)
-
-# Set RPATH-handing (CMake parameters)
-set(CMAKE_SKIP_BUILD_RPATH 0)
-set(CMAKE_BUILD_WITH_INSTALL_RPATH 0)
-set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
-set(CMAKE_INSTALL_RPATH_USE_LINK_PATH 1)
-
-# set macro-directory
-set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/macros")
-
-# build in Release-mode by default if not explicitly set
-if( NOT CMAKE_BUILD_TYPE )
- set(CMAKE_BUILD_TYPE "Release")
-endif()
-
-include(CheckCXXSourceRuns)
-include(CheckIncludeFiles)
-
-# set default buildoptions and print them
-include(cmake/options.cmake)
-
-# turn off PCH totally if enabled (hidden setting, mainly for devs)
-if( NOPCH )
- set(USE_COREPCH 0)
- set(USE_SCRIPTPCH 0)
-endif()
-
-include(CheckPlatform)
-
-# basic packagesearching and setup (further support will be needed, this is a preliminary release!)
-find_package(PCHSupport)
-find_package(ACE REQUIRED)
-find_package(OpenSSL REQUIRED)
-if( NOT USE_MYSQL_SOURCES )
- find_package(MySQL REQUIRED)
-endif()
-
-if( UNIX )
- find_package(Readline)
- find_package(ZLIB)
- find_package(BZip2)
-endif()
-
-# Find revision ID and hash of the sourcetree
-include(cmake/genrev.cmake)
-
-# print out the results before continuing
-include(cmake/showoptions.cmake)
-
-# add dependencies
-add_subdirectory(dep)
-
-# add core sources
-add_subdirectory(src)
View
339 COPYING
@@ -1,339 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
View
23 PreLoad.cmake
@@ -1,23 +0,0 @@
-# Copyright (C) 2005-2012 Trinity <http://www.trinitycore.org/>
-#
-# This file is free software; as a special exception the author gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-# This file is run right before CMake starts configuring the sourcetree
-
-# Example: Force CMAKE_INSTALL_PREFIX to be preloaded with something before
-# doing the actual first "configure"-part - allows for hardforcing
-# destinations elsewhere in the CMake buildsystem (commented out on purpose)
-
-# Override CMAKE_INSTALL_PREFIX on Windows platforms
-#if( WIN32 )
-# if( NOT CYGWIN )
-# set(CMAKE_INSTALL_PREFIX
-# "" CACHE PATH "Default install path")
-# endif()
-#endif()
View
0 README
No changes.
View
76 THANKS
@@ -1,76 +0,0 @@
-= TrinityCore -- Thanks/credits file =
-
-TrinityCore is a derivation/rewrite of MaNGOS, which was originally written
-by Team Python and the WoW Daemon Team. Many people further helped Trinity Core
-by submitting bug reports, code patches, and suggestions. Thanks to the
-community!
-
-Special thanks should go out to the WowwoW team. We have gained help from
-them many times in the creation of this project. Keep up the good work guys.
-
-Thanks to the ScriptDev2 team (http://www.scriptdev2.com) for scripts.
-
-Thanks to the WCell team (especially Ralek) for research on realm reconnect
-sequence, item scaling stats algorithm, gameobject rotation issues.
-
-Thanks go out to the following people for various patches/code (listed in the
-order they were added): w12x, dythzer, XEQT, death420, balrok, TOM_RUS,
-runningnak3d, Seline, KingPin, raczman, bogie, Neo2003, NoFantasy, Derex,
-freghar, toilet1, megamage, MadJack, WarHead, gvcoman, Ntsc, arrai, jrkpote,
-Seraphim, vagoth, KerchumA222, Rognar, Blaymoira, DragonHunter, Molius, ApoC,
-SeT, hunuza, Wyk3d, VladimirMangos, rj686, Arthorius, QAston, Muhaha, dereka,
-Kaldorei, NuRRi, Biglad, Machiavelli, Nivelo, Paradox, Aokromes, EleGoS,
-Visagalis, reno, Cybrax, GriffonHeart, fgenesis, rilex, XTElite1, Anubisss, eL,
-Iskander, arclite, Bladex, EIFEL, Klaimmore, XTZGZoReX, panaut0lordv, DearScorpion,
-BlueSteel, AlexDereka, Drahy, krz, Xeptor, Sethoso, Sarjuuk, pasdVn, nissen,
-Triply, `win, Fog, emsy, McBitter, Lukaasm, maikash, Wormheart, DonTomika,
-DiSlord, Tiretunderl, Ramses_II, cccyril, Cha0S2, miebaik, Trazom, KiriX,
-darkEvil, Sorken, Kudlaty, Charlie2025, Medwise, Rat, Lutik, domingo,
-TrullyONE, rastikzzz, Tassader, Lightguard, KAPATEJIb, Tux`Volant, zhanhang03,
-Asael, Elron, False, nos4r2zod, Disassembler, thumsoul, rvnth, throneinc,
-MrTux, Luniz2k1, Dani, BroodWyrm, raven_coda, Bagsac, Thraxx, Trogvar,
-teacher4, zhenya, Albrecht de Endrau, Phacops, Naicisum, thenecromancer, shax,
-cryingcloud, freeganja, Foks, daveh, Az@zel, evilstar, Corfen, Astellar, Maxxie,
-DEN_North, StarJoker, Nezemnoy, X-Savior, subhuman_bob, Ambal, Brueggus, sparc,
-jojo, Trojan, tvaroh, Genars, BombermaG, Bulkin, nesocip, xILOSWag, SilverIce,
-Uruviel, timmit, SeT, Seizerkiller, Stokrotka, JoN0, Tanatos, Hunteee, Alyen,
-Farah, Them, DaGNU, arthurcik, BudIcePenguin, Amok, Amit86, onkelz28, Azrael,
-Larva, Roland, DerDyddye, Vicos, PSZ, CRAZyBUg, irish, Sephiroth1984, hunuza,
-mike753, Xlybriem, Paytheo, ArticDevil, FearX, Beaste, bufferoverflow, Jeniczek,
-Den, bobaz, crackm, seirge, D_Skywalk, mknjc, Christyan, Saeba, Nevan, tlexii,
-liszt, duckman, Joro, Charlie, smellbee, bigjohnson4, maxdestroyer, Destalker,
-ckegg, Drethek, yad02, Win32, NetSky, Zcuron, Necroo, ogeraisi, Coldblooded,
-Edder, riddick, Craker, NeoLithicX, srounet, SLG, Tidus, neo0608, SyRiOCoP,
-F636y623, Patro, mobel, simak, hectolight, Riccardo, GodsdoG, Gomez, kamir86, fredi,
-qubix, Deafboy, Authorius, DarkRabbit, mrbungle, netoya, peldor, eumario, Alex,
-Moandor, ebx, DasBlub, guenex, Brats, Lucy, arcx, Enril, oiler2112,
-Wizz, Elminster, 123qwe, NeatElves, Turk3y, deicide, vladonix, nugu100,
-Skystar, Reve, jorooo, FrozenDB, miranda.conrado, Tequila, Gommes, Zerg2000,
-aerione_alt, Rastik, FrenchW, wilibald09, Velorien, kancaras, fisherman,
-Aviram, Mufik, loop69, multiplexer, Koani, rechapa79, kozelo, MeanMachine,
-fregh, adrycasillo, IncoGnito, Alez, Itch, Kuteur, MaS0n, peaceman, manuel,
-Gendalph, Lynx3d, raftom, Infinity, Ebrithil, Sorya, HP1, Prince, redcore,
-Boogie, Necro, Thyros, simon, MrSmite, horogandris, Stryker, MaXiMiUS, kaell,
-totoro, Forgiven, Big, Oculus, Lorac, Nemesis, Epsik, iadus3, durotar, hoshie,
-fukifat, imbecile, Nafsih, Meldanor, Turok, Naturamen, Themris, Sundark,
-Azuritus, jotapdiez, EnderGT, Curuad, oc_redfox, rockzOr, Darkshines,
-BlackYoghurt, McLovin, Gyullo, kaxap, Hawthorne, nanouniko, new001, Opterman,
-Typhoon, Cleave, HiZed, The_Game_Master, Athor, Veras, Menia, Jolan, BlackOne,
-johnholiver, Spp, Drevi, kb_z, Tartalo, Shendor, Demonx, Taliesin, defacer,
-SoulForge, Jackpoz, Cass, QuaLiT1, exul182, sunwell, AniRB, clotza, Tommassino,
-dracula70, alexsot, RedSonja, Cnillidan, Proofzor, aqs999, Sony, amsjunior123,
-Sisif, Joshh, alex_1983, arez, RammboNr5, Insider, bodompelle, lobuz, Azazel,
-footman, elron103, make_the_king, destros, MetaphysicalDrama, disassebler,
-Malcrom, Vladmimír Lipták, retriman, hyriuu, Smakapotatis, PainKiller,
-bkhorizon, n0n4m3, Chesterfield, Frankir, Wowka321, Morpheux, p0wer,
-Ouden, toshik, laise, yavi, Splinter, Syntec, Arthas, denyde, unholy,
-Vaughner, blackmanos, edrinn, Liberate, Shauren, dr.tenma, click, silverice,
-SupaBad, Xanadu, Socolin, Shocker, Silinoron, 0xFuture, xK1, Ramus, menke,
-wowgargamel, Dark0r, Kierkegaard, Leak, ge0rg, StormByte, joshwhedon,
-BlackCat0110, JuliuSZS, n4rk0, filip.havlicek, m.ax, laviniu, LordJZ, Scazzato88,
-svannon, jurkovic.nikola, Willian Krueger, BioHazard, Ille000, Erocoloco,
-terrorbringer, antihrists, Havenard, scarymovie87, D3VIL, FaTe753, PrinceCreed,
-spgm, Dakeyras, sombre88, 19Maxx83, moriquendu, Ille, breakerfly,
-zthoreen, clement.roussel, p.alexej, Ceris, Nayre, Kiper, announce, thmarth,
-Ner'zhul, DarkXuan, leak, linencloth, SnakeIce, Supabad, Tome, Nay, Kaelima,
-Svannon
View
24 cmake/compiler/gcc/settings.cmake
@@ -1,24 +0,0 @@
-# Set build-directive (used in core to tell which buildtype we used)
-add_definitions(-D_BUILD_DIRECTIVE='"${CMAKE_BUILD_TYPE}"')
-
-add_definitions(-fno-delete-null-pointer-checks)
-
-if(PLATFORM EQUAL 32)
- # Required on 32-bit systems to enable SSE2 (standard on x64)
- add_definitions(-msse2 -mfpmath=sse)
-endif()
-add_definitions(-DHAVE_SSE2 -D__SSE2__)
-message(STATUS "GCC: SSE2 flags forced")
-
-if( WITH_WARNINGS )
- add_definitions(-Wall -Wfatal-errors -Wextra)
- message(STATUS "GCC: All warnings enabled")
-else()
- add_definitions(--no-warnings)
- message(STATUS "GCC: All warnings disabled")
-endif()
-
-if( WITH_COREDEBUG )
- add_definitions(-ggdb3)
- message(STATUS "GCC: Debug-flags set (-ggdb3)")
-endif()
View
21 cmake/compiler/icc/settings.cmake
@@ -1,21 +0,0 @@
-# Set build-directive (used in core to tell which buildtype we used)
-add_definitions(-D_BUILD_DIRECTIVE="${CMAKE_BUILD_TYPE}")
-
-if(PLATFORM EQUAL 32)
- add_definitions(-axSSE2)
-else()
- add_definitions(-xSSE2)
-endif()
-
-if( WITH_WARNINGS )
- add_definitions(-w1)
- message(STATUS "ICC All warnings enabled")
-else()
- add_definitions(-w)
- message(STATUS "ICC: All warnings disabled")
-endif()
-
-if( WITH_COREDEBUG )
- add_definitions(-g)
- message(STATUS "ICC: Debug-flag set (-g)")
-endif()
View
52 cmake/compiler/msvc/settings.cmake
@@ -1,52 +0,0 @@
-# set up output paths for executable binaries (.exe-files, and .dll-files on DLL-capable platforms)
-set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
-
-# set up output paths ofr static libraries etc (commented out - shown here as an example only)
-#set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
-#set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
-
-if(PLATFORM EQUAL 64)
- # This definition is necessary to work around a bug with Intellisense described
- # here: http://tinyurl.com/2cb428. Syntax highlighting is important for proper
- # debugger functionality.
- add_definitions("-D_WIN64")
- message(STATUS "MSVC: 64-bit platform, enforced -D_WIN64 parameter")
-
- #Enable extended object support for debug compiles on X64 (not required on X86)
- set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /bigobj")
- message(STATUS "MSVC: Enabled extended object-support for debug-compiles")
-else()
- # mark 32 bit executables large address aware so they can use > 2GB address space
- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE")
- message(STATUS "MSVC: Enabled large address awareness")
-
- add_definitions(/arch:SSE2)
- message(STATUS "MSVC: Enabled SSE2 support")
-endif()
-
-# Set build-directive (used in core to tell which buildtype we used)
-add_definitions(-D_BUILD_DIRECTIVE=\\"$(ConfigurationName)\\")
-
-# multithreaded compiling on VS
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
-
-# Define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES - eliminates the warning by changing the strcpy call to strcpy_s, which prevents buffer overruns
-add_definitions(-D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES)
-message(STATUS "MSVC: Overloaded standard names")
-
-# Ignore warnings about older, less secure functions
-add_definitions(-D_CRT_SECURE_NO_WARNINGS)
-message(STATUS "MSVC: Disabled NON-SECURE warnings")
-
-#Ignore warnings about POSIX deprecation
-add_definitions(-D_CRT_NONSTDC_NO_WARNINGS)
-message(STATUS "MSVC: Disabled POSIX warnings")
-
-# disable warnings in Visual Studio 8 and above if not wanted
-if(NOT WITH_WARNINGS)
- if(MSVC AND NOT CMAKE_GENERATOR MATCHES "Visual Studio 7")
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4996 /wd4355 /wd4244 /wd4985 /wd4267 /wd4619")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4996 /wd4355 /wd4244 /wd4985 /wd4267 /wd4619")
- message(STATUS "MSVC: Disabled generic compiletime warnings")
- endif()
-endif()
View
2 cmake/compiler/xcode/settings.cmake
@@ -1,2 +0,0 @@
-# Set build-directive (used in core to tell which buildtype we used)
-add_definitions(-D_BUILD_DIRECTIVE='"$(CONFIGURATION)"')
View
82 cmake/genrev.cmake
@@ -1,82 +0,0 @@
-# Copyright (C) 2008-2012 Trinity <http://www.trinitycore.org/>
-#
-# This file is free software; as a special exception the author gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-include(${CMAKE_SOURCE_DIR}/cmake/macros/EnsureVersion.cmake)
-
-set(_REQUIRED_GIT_VERSION "1.7")
-
-find_program(_GIT_EXEC
- NAMES
- git git.cmd
- HINTS
- ENV PATH
- DOC "git installation path"
-)
-
-if(_GIT_EXEC)
- execute_process(
- COMMAND "${_GIT_EXEC}" --version
- WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
- OUTPUT_VARIABLE _GIT_VERSION
- ERROR_QUIET
- )
-
- # make sure we're using minimum the required version of git, so the "dirty-testing" will work properly
- ensure_version( "${_REQUIRED_GIT_VERSION}" "${_GIT_VERSION}" _GIT_VERSION_OK)
-endif()
-
-if(_GIT_VERSION_OK)
- execute_process(
- COMMAND "${_GIT_EXEC}" describe --match init --dirty=+ --abbrev=12
- WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
- OUTPUT_VARIABLE rev_info
- OUTPUT_STRIP_TRAILING_WHITESPACE
- ERROR_QUIET
- )
- execute_process(
- COMMAND "${_GIT_EXEC}" show -s --format=%ci
- WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
- OUTPUT_VARIABLE rev_date
- OUTPUT_STRIP_TRAILING_WHITESPACE
- ERROR_QUIET
- )
-else()
- message("")
- message(STATUS "WARNING - Missing or outdated git - did you forget to install a recent version?")
- message(STATUS "WARNING - Observe that for revision hash/date to work you need at least version ${_REQUIRED_GIT_VERSION}")
-endif()
-
-# Last minute check - ensure that we have a proper revision
-# If everything above fails (means the user has erased the git revision control directory or removed the origin/HEAD tag)
-if(NOT rev_info)
- # No valid ways available to find/set the revision/hash, so let's force some defaults
- message(STATUS "WARNING - Missing repository tags - you may need to pull tags with git fetch -t")
- message(STATUS "WARNING - Continuing anyway - note that the versionstring will be set to 0000-00-00 00:00:00 (Archived)")
- set(rev_date "0000-00-00 00:00:00 +0000")
- set(rev_hash "Archived")
-else()
- # Extract information required to build a proper versionstring
- string(REGEX REPLACE init-|[0-9]+-g "" rev_hash ${rev_info})
-endif()
-
-# Its not set during initial run
-if(NOT BUILDDIR)
- set(BUILDDIR ${CMAKE_BINARY_DIR})
-endif()
-
-# Create the actual revision.h file from the above params
-if(NOT "${rev_hash_cached}" MATCHES "${rev_hash}")
- configure_file(
- "${CMAKE_SOURCE_DIR}/revision.h.in.cmake"
- "${BUILDDIR}/revision.h"
- @ONLY
- )
- set(rev_hash_cached "${rev_hash}" CACHE INTERNAL "Cached commit-hash")
-endif()
View
23 cmake/macros/CheckBuildDir.cmake
@@ -1,23 +0,0 @@
-# Copyright (C) 2008-2012 Trinity <http://www.trinitycore.org/>
-#
-# This file is free software; as a special exception the author gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-#
-# Force out-of-source build
-#
-
-string(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" BUILDING_IN_SOURCE)
-
-if( BUILDING_IN_SOURCE )
- message(FATAL_ERROR "
- This project requires an out of source build. Remove the file 'CMakeCache.txt'
- found in this directory before continuing, create a separate build directory
- and run 'cmake path_to_project [options]' from there.
- ")
-endif()
View
18 cmake/macros/CheckPlatform.cmake
@@ -1,18 +0,0 @@
-# check what platform we're on (64-bit or 32-bit), and create a simpler test than CMAKE_SIZEOF_VOID_P
-if(CMAKE_SIZEOF_VOID_P MATCHES 8)
- set(PLATFORM 64)
- MESSAGE(STATUS "Detected 64-bit platform")
-else()
- set(PLATFORM 32)
- MESSAGE(STATUS "Detected 32-bit platform")
-endif()
-
-include("${CMAKE_SOURCE_DIR}/cmake/platform/settings.cmake")
-
-if(WIN32)
- include("${CMAKE_SOURCE_DIR}/cmake/platform/win/settings.cmake")
-elseif(APPLE)
- include("${CMAKE_SOURCE_DIR}/cmake/platform/osx/settings.cmake")
-elseif(UNIX)
- include("${CMAKE_SOURCE_DIR}/cmake/platform/unix/settings.cmake")
-endif()
View
115 cmake/macros/EnsureVersion.cmake
@@ -1,115 +0,0 @@
-# This file defines the following macros for developers to use in ensuring
-# that installed software is of the right version:
-#
-# ENSURE_VERSION - test that a version number is greater than
-# or equal to some minimum
-# ENSURE_VERSION_RANGE - test that a version number is greater than
-# or equal to some minimum and less than some
-# maximum
-# ENSURE_VERSION2 - deprecated, do not use in new code
-#
-
-# ENSURE_VERSION
-# This macro compares version numbers of the form "x.y.z" or "x.y"
-# ENSURE_VERSION( FOO_MIN_VERSION FOO_VERSION_FOUND FOO_VERSION_OK)
-# will set FOO_VERSION_OK to true if FOO_VERSION_FOUND >= FOO_MIN_VERSION
-# Leading and trailing text is ok, e.g.
-# ENSURE_VERSION( "2.5.31" "flex 2.5.4a" VERSION_OK)
-# which means 2.5.31 is required and "flex 2.5.4a" is what was found on the system
-
-# Copyright (c) 2006, David Faure, <faure@kde.org>
-# Copyright (c) 2007, Will Stephenson <wstephenson@kde.org>
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
-# ENSURE_VERSION_RANGE
-# This macro ensures that a version number of the form
-# "x.y.z" or "x.y" falls within a range defined by
-# min_version <= found_version < max_version.
-# If this expression holds, FOO_VERSION_OK will be set TRUE
-#
-# Example: ENSURE_VERSION_RANGE3( "0.1.0" ${FOOCODE_VERSION} "0.7.0" FOO_VERSION_OK )
-#
-# This macro will break silently if any of x,y,z are greater than 100.
-#
-# Copyright (c) 2007, Will Stephenson <wstephenson@kde.org>
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
-# NORMALIZE_VERSION
-# Helper macro to convert version numbers of the form "x.y.z"
-# to an integer equal to 10^4 * x + 10^2 * y + z
-#
-# This macro will break silently if any of x,y,z are greater than 100.
-#
-# Copyright (c) 2006, David Faure, <faure@kde.org>
-# Copyright (c) 2007, Will Stephenson <wstephenson@kde.org>
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
-# CHECK_RANGE_INCLUSIVE_LOWER
-# Helper macro to check whether x <= y < z
-#
-# Copyright (c) 2007, Will Stephenson <wstephenson@kde.org>
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
-
-MACRO(NORMALIZE_VERSION _requested_version _normalized_version)
- STRING(REGEX MATCH "[^0-9]*[0-9]+\\.[0-9]+\\.[0-9]+.*" _threePartMatch "${_requested_version}")
- if (_threePartMatch)
- # parse the parts of the version string
- STRING(REGEX REPLACE "[^0-9]*([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" _major_vers "${_requested_version}")
- STRING(REGEX REPLACE "[^0-9]*[0-9]+\\.([0-9]+)\\.[0-9]+.*" "\\1" _minor_vers "${_requested_version}")
- STRING(REGEX REPLACE "[^0-9]*[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" _patch_vers "${_requested_version}")
- else (_threePartMatch)
- STRING(REGEX REPLACE "([0-9]+)\\.[0-9]+" "\\1" _major_vers "${_requested_version}")
- STRING(REGEX REPLACE "[0-9]+\\.([0-9]+)" "\\1" _minor_vers "${_requested_version}")
- set(_patch_vers "0")
- endif (_threePartMatch)
-
- # compute an overall version number which can be compared at once
- MATH(EXPR ${_normalized_version} "${_major_vers}*10000 + ${_minor_vers}*100 + ${_patch_vers}")
-ENDMACRO(NORMALIZE_VERSION)
-
-MACRO(CHECK_RANGE_INCLUSIVE_LOWER _lower_limit _value _upper_limit _ok)
- if (${_value} LESS ${_lower_limit})
- set( ${_ok} FALSE )
- elseif (${_value} EQUAL ${_lower_limit})
- set( ${_ok} TRUE )
- elseif (${_value} EQUAL ${_upper_limit})
- set( ${_ok} FALSE )
- elseif (${_value} GREATER ${_upper_limit})
- set( ${_ok} FALSE )
- else (${_value} LESS ${_lower_limit})
- set( ${_ok} TRUE )
- endif (${_value} LESS ${_lower_limit})
-ENDMACRO(CHECK_RANGE_INCLUSIVE_LOWER)
-
-MACRO(ENSURE_VERSION requested_version found_version var_too_old)
- NORMALIZE_VERSION( ${requested_version} req_vers_num )
- NORMALIZE_VERSION( ${found_version} found_vers_num )
-
- if (found_vers_num LESS req_vers_num)
- set( ${var_too_old} FALSE )
- else (found_vers_num LESS req_vers_num)
- set( ${var_too_old} TRUE )
- endif (found_vers_num LESS req_vers_num)
-
-ENDMACRO(ENSURE_VERSION)
-
-MACRO(ENSURE_VERSION2 requested_version2 found_version2 var_too_old2)
- ENSURE_VERSION( ${requested_version2} ${found_version2} ${var_too_old2})
-ENDMACRO(ENSURE_VERSION2)
-
-MACRO(ENSURE_VERSION_RANGE min_version found_version max_version var_ok)
- NORMALIZE_VERSION( ${min_version} req_vers_num )
- NORMALIZE_VERSION( ${found_version} found_vers_num )
- NORMALIZE_VERSION( ${max_version} max_vers_num )
-
- CHECK_RANGE_INCLUSIVE_LOWER( ${req_vers_num} ${found_vers_num} ${max_vers_num} ${var_ok})
-ENDMACRO(ENSURE_VERSION_RANGE)
View
65 cmake/macros/FindACE.cmake
@@ -1,65 +0,0 @@
-#
-# Find the ACE client includes and library
-#
-
-# This module defines
-# ACE_INCLUDE_DIR, where to find ace.h
-# ACE_LIBRARIES, the libraries to link against
-# ACE_FOUND, if false, you cannot build anything that requires ACE
-
-# also defined, but not for general use are
-# ACE_LIBRARY, where to find the ACE library.
-
-set( ACE_FOUND 0 )
-
-if ( UNIX )
- FIND_PATH( ACE_INCLUDE_DIR
- NAMES
- ace/ACE.h
- PATHS
- /usr/include
- /usr/include/ace
- /usr/local/include
- /usr/local/include/ace
- $ENV{ACE_ROOT}
- $ENV{ACE_ROOT}/include
- ${CMAKE_SOURCE_DIR}/externals/ace
- DOC
- "Specify include-directories that might contain ace.h here."
- )
- FIND_LIBRARY( ACE_LIBRARY
- NAMES
- ace ACE
- PATHS
- /usr/lib
- /usr/lib/ace
- /usr/local/lib
- /usr/local/lib/ace
- /usr/local/ace/lib
- $ENV{ACE_ROOT}/lib
- $ENV{ACE_ROOT}
- DOC "Specify library-locations that might contain the ACE library here."
- )
-
-# FIND_LIBRARY( ACE_EXTRA_LIBRARIES
-# NAMES
-# z zlib
-# PATHS
-# /usr/lib
-# /usr/local/lib
-# DOC
-# "if more libraries are necessary to link into ACE, specify them here."
-# )
-
- if ( ACE_LIBRARY )
- if ( ACE_INCLUDE_DIR )
- set( ACE_FOUND 1 )
- message( STATUS "Found ACE library: ${ACE_LIBRARY}")
- message( STATUS "Found ACE headers: ${ACE_INCLUDE_DIR}")
- else ( ACE_INCLUDE_DIR )
- message(FATAL_ERROR "Could not find ACE headers! Please install ACE libraries and headers")
- endif ( ACE_INCLUDE_DIR )
- endif ( ACE_LIBRARY )
-
- mark_as_advanced( ACE_FOUND ACE_LIBRARY ACE_EXTRA_LIBRARIES ACE_INCLUDE_DIR )
-endif (UNIX)
View
176 cmake/macros/FindMySQL.cmake
@@ -1,176 +0,0 @@
-#
-# Find the MySQL client includes and library
-#
-
-# This module defines
-# MYSQL_INCLUDE_DIR, where to find mysql.h
-# MYSQL_LIBRARIES, the libraries to link against to connect to MySQL
-# MYSQL_FOUND, if false, you cannot build anything that requires MySQL.
-
-# also defined, but not for general use are
-# MYSQL_LIBRARY, where to find the MySQL library.
-
-set( MYSQL_FOUND 0 )
-
-if( UNIX )
- set(MYSQL_CONFIG_PREFER_PATH "$ENV{MYSQL_HOME}/bin" CACHE FILEPATH
- "preferred path to MySQL (mysql_config)"
- )
-
- find_program(MYSQL_CONFIG mysql_config
- ${MYSQL_CONFIG_PREFER_PATH}
- /usr/local/mysql/bin/
- /usr/local/bin/
- /usr/bin/
- )
-
- if( MYSQL_CONFIG )
- message(STATUS "Using mysql-config: ${MYSQL_CONFIG}")
- # set INCLUDE_DIR
- exec_program(${MYSQL_CONFIG}
- ARGS --include
- OUTPUT_VARIABLE MY_TMP
- )
-
- string(REGEX REPLACE "-I([^ ]*)( .*)?" "\\1" MY_TMP "${MY_TMP}")
- set(MYSQL_ADD_INCLUDE_PATH ${MY_TMP} CACHE FILEPATH INTERNAL)
- #message("[DEBUG] MYSQL ADD_INCLUDE_PATH : ${MYSQL_ADD_INCLUDE_PATH}")
- # set LIBRARY_DIR
- exec_program(${MYSQL_CONFIG}
- ARGS --libs_r
- OUTPUT_VARIABLE MY_TMP
- )
- set(MYSQL_ADD_LIBRARIES "")
- string(REGEX MATCHALL "-l[^ ]*" MYSQL_LIB_LIST "${MY_TMP}")
- foreach(LIB ${MYSQL_LIB_LIST})
- string(REGEX REPLACE "[ ]*-l([^ ]*)" "\\1" LIB "${LIB}")
- list(APPEND MYSQL_ADD_LIBRARIES "${LIB}")
- #message("[DEBUG] MYSQL ADD_LIBRARIES : ${MYSQL_ADD_LIBRARIES}")
- endforeach(LIB ${MYSQL_LIB_LIST})
-
- set(MYSQL_ADD_LIBRARIES_PATH "")
- string(REGEX MATCHALL "-L[^ ]*" MYSQL_LIBDIR_LIST "${MY_TMP}")
- foreach(LIB ${MYSQL_LIBDIR_LIST})
- string(REGEX REPLACE "[ ]*-L([^ ]*)" "\\1" LIB "${LIB}")
- list(APPEND MYSQL_ADD_LIBRARIES_PATH "${LIB}")
- #message("[DEBUG] MYSQL ADD_LIBRARIES_PATH : ${MYSQL_ADD_LIBRARIES_PATH}")
- endforeach(LIB ${MYSQL_LIBS})
-
- else( MYSQL_CONFIG )
- set(MYSQL_ADD_LIBRARIES "")
- list(APPEND MYSQL_ADD_LIBRARIES "mysqlclient_r")
- endif( MYSQL_CONFIG )
-endif( UNIX )
-
-find_path(MYSQL_INCLUDE_DIR
- NAMES
- mysql.h
- PATHS
- ${MYSQL_ADD_INCLUDE_PATH}
- /usr/include
- /usr/include/mysql
- /usr/local/include
- /usr/local/include/mysql
- /usr/local/mysql/include
- "C:/Program Files/MySQL/MySQL Server 5.6/include"
- "C:/Program Files/MySQL/MySQL Server 5.5/include"
- "C:/Program Files/MySQL/MySQL Server 5.1/include"
- "C:/Program Files/MySQL/MySQL Server 5.0/include"
- "C:/Program Files/MySQL/include"
- "C:/MySQL/include"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.6;Location]/include"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.5;Location]/include"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.1;Location]/include"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.0;Location]/include"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.6;Location]/include"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.5;Location]/include"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.1;Location]/include"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.0;Location]/include"
- "$ENV{ProgramFiles}/MySQL/*/include"
- "$ENV{SystemDrive}/MySQL/*/include"
- "c:/msys/local/include"
- DOC
- "Specify the directory containing mysql.h."
-)
-
-if( UNIX )
- foreach(LIB ${MYSQL_ADD_LIBRARIES})
- find_library( MYSQL_LIBRARY
- NAMES
- mysql libmysql ${LIB}
- PATHS
- ${MYSQL_ADD_LIBRARIES_PATH}
- /usr/lib
- /usr/lib/mysql
- /usr/local/lib
- /usr/local/lib/mysql
- /usr/local/mysql/lib
- DOC "Specify the location of the mysql library here."
- )
- endforeach(LIB ${MYSQL_ADD_LIBRARY})
-endif( UNIX )
-
-if( WIN32 )
- find_library( MYSQL_LIBRARY
- NAMES
- libmysql
- PATHS
- ${MYSQL_ADD_LIBRARIES_PATH}
- "C:/Program Files/MySQL/MySQL Server 5.6/lib/opt"
- "C:/Program Files/MySQL/MySQL Server 5.5/lib/opt"
- "C:/Program Files/MySQL/MySQL Server 5.1/lib/opt"
- "C:/Program Files/MySQL/MySQL Server 5.0/lib/opt"
- "C:/Program Files/MySQL/lib"
- "C:/MySQL/lib/debug"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.6;Location]/lib"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.6;Location]/lib/opt"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.5;Location]/lib"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.5;Location]/lib/opt"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.1;Location]/lib"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.1;Location]/lib/opt"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.0;Location]/lib"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.0;Location]/lib/opt"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.6;Location]/lib"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.6;Location]/lib/opt"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.5;Location]/lib"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.5;Location]/lib/opt"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.1;Location]/lib"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.1;Location]/lib/opt"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.0;Location]/lib"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 5.0;Location]/lib/opt"
- "$ENV{ProgramFiles}/MySQL/*/lib/opt"
- "$ENV{SystemDrive}/MySQL/*/lib/opt"
- "c:/msys/local/include"
- DOC "Specify the location of the mysql library here."
- )
-endif( WIN32 )
-
-# On Windows you typically don't need to include any extra libraries
-# to build MYSQL stuff.
-
-if( NOT WIN32 )
- find_library( MYSQL_EXTRA_LIBRARIES
- NAMES
- z zlib
- PATHS
- /usr/lib
- /usr/local/lib
- DOC
- "if more libraries are necessary to link in a MySQL client (typically zlib), specify them here."
- )
-else( NOT WIN32 )
- set( MYSQL_EXTRA_LIBRARIES "" )
-endif( NOT WIN32 )
-
-if( MYSQL_LIBRARY )
- if( MYSQL_INCLUDE_DIR )
- set( MYSQL_FOUND 1 )
- message(STATUS "Found MySQL library: ${MYSQL_LIBRARY}")
- message(STATUS "Found MySQL headers: ${MYSQL_INCLUDE_DIR}")
- else( MYSQL_INCLUDE_DIR )
- message(FATAL_ERROR "Could not find MySQL headers! Please install the development libraries and headers")
- endif( MYSQL_INCLUDE_DIR )
- mark_as_advanced( MYSQL_FOUND MYSQL_LIBRARY MYSQL_EXTRA_LIBRARIES MYSQL_INCLUDE_DIR )
-else( MYSQL_LIBRARY )
- message(FATAL_ERROR "Could not find the MySQL libraries! Please install the development libraries and headers")
-endif( MYSQL_LIBRARY )
View
180 cmake/macros/FindOpenSSL.cmake
@@ -1,180 +0,0 @@
-# - Try to find the OpenSSL encryption library
-# Once done this will define
-#
-# OPENSSL_ROOT_DIR - Set this variable to the root installation of OpenSSL
-#
-# Read-Only variables:
-# OPENSSL_FOUND - system has the OpenSSL library
-# OPENSSL_INCLUDE_DIR - the OpenSSL include directory
-# OPENSSL_LIBRARIES - The libraries needed to use OpenSSL
-
-#=============================================================================
-# Copyright 2006-2009 Kitware, Inc.
-# Copyright 2006 Alexander Neundorf <neundorf@kde.org>
-# Copyright 2009-2010 Mathieu Malaterre <mathieu.malaterre@gmail.com>
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distributed this file outside of CMake, substitute the full
-# License text for the above reference.)
-
-# http://www.slproweb.com/products/Win32OpenSSL.html
-
-SET(_OPENSSL_ROOT_HINTS
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;Inno Setup: App Path]"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (64-bit)_is1;Inno Setup: App Path]"
- )
-
-IF(PLATFORM EQUAL 64)
- SET(_OPENSSL_ROOT_PATHS
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (64-bit)_is1;InstallLocation]"
- "C:/OpenSSL-Win64/"
- "C:/OpenSSL/"
- )
-ELSE()
- SET(_OPENSSL_ROOT_PATHS
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;InstallLocation]"
- "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;InstallLocation]"
- "C:/OpenSSL/"
- )
-ENDIF()
-
-FIND_PATH(OPENSSL_ROOT_DIR
- NAMES
- include/openssl/ssl.h
- HINTS
- ${_OPENSSL_ROOT_HINTS}
- PATHS
- ${_OPENSSL_ROOT_PATHS}
-)
-MARK_AS_ADVANCED(OPENSSL_ROOT_DIR)
-
-# Re-use the previous path:
-FIND_PATH(OPENSSL_INCLUDE_DIR openssl/ssl.h
- ${OPENSSL_ROOT_DIR}/include
-)
-
-IF(WIN32 AND NOT CYGWIN)
- # MINGW should go here too
- IF(MSVC)
- # /MD and /MDd are the standard values - if someone wants to use
- # others, the libnames have to change here too
- # use also ssl and ssleay32 in debug as fallback for openssl < 0.9.8b
- # TODO: handle /MT and static lib
- # In Visual C++ naming convention each of these four kinds of Windows libraries has it's standard suffix:
- # * MD for dynamic-release
- # * MDd for dynamic-debug
- # * MT for static-release
- # * MTd for static-debug
-
- # Implementation details:
- # We are using the libraries located in the VC subdir instead of the parent directory eventhough :
- # libeay32MD.lib is identical to ../libeay32.lib, and
- # ssleay32MD.lib is identical to ../ssleay32.lib
-
- FIND_LIBRARY(LIB_EAY_DEBUG
- NAMES
- libeay32MDd libeay32
- PATHS
- ${OPENSSL_ROOT_DIR}/lib/VC
- )
-
- FIND_LIBRARY(LIB_EAY_RELEASE
- NAMES
- libeay32MD libeay32
- PATHS
- ${OPENSSL_ROOT_DIR}/lib/VC
- )
-
- FIND_LIBRARY(SSL_EAY_DEBUG
- NAMES
- ssleay32MDd ssleay32 ssl
- PATHS
- ${OPENSSL_ROOT_DIR}/lib/VC
- )
-
- FIND_LIBRARY(SSL_EAY_RELEASE
- NAMES
- ssleay32MD ssleay32 ssl
- PATHS
- ${OPENSSL_ROOT_DIR}/lib/VC
- )
-
- if( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
- set( OPENSSL_LIBRARIES
- optimized ${SSL_EAY_RELEASE} ${LIB_EAY_RELEASE}
- debug ${SSL_EAY_DEBUG} ${LIB_EAY_DEBUG}
- )
- else()
- set( OPENSSL_LIBRARIES
- ${SSL_EAY_RELEASE}
- ${LIB_EAY_RELEASE}
- )
- endif()
-
- MARK_AS_ADVANCED(SSL_EAY_DEBUG SSL_EAY_RELEASE LIB_EAY_DEBUG LIB_EAY_RELEASE)
- ELSEIF(MINGW)
-
- # same player, for MingW
- FIND_LIBRARY(LIB_EAY
- NAMES
- libeay32
- PATHS
- ${OPENSSL_ROOT_DIR}/lib/MinGW
- )
-
- FIND_LIBRARY(SSL_EAY NAMES
- NAMES
- ssleay32
- PATHS
- ${OPENSSL_ROOT_DIR}/lib/MinGW
- )
-
- MARK_AS_ADVANCED(SSL_EAY LIB_EAY)
-
- set( OPENSSL_LIBRARIES
- ${SSL_EAY}
- ${LIB_EAY}
- )
- ELSE(MSVC)
- # Not sure what to pick for -say- intel, let's use the toplevel ones and hope someone report issues:
- FIND_LIBRARY(LIB_EAY
- NAMES
- libeay32
- PATHS
- ${OPENSSL_ROOT_DIR}/lib
- ${OPENSSL_ROOT_DIR}/lib/VC
- )
-
- FIND_LIBRARY(SSL_EAY
- NAMES
- ssleay32
- PATHS
- ${OPENSSL_ROOT_DIR}/lib
- ${OPENSSL_ROOT_DIR}/lib/VC
- )
- MARK_AS_ADVANCED(SSL_EAY LIB_EAY)
-
- SET( OPENSSL_LIBRARIES ${SSL_EAY} ${LIB_EAY} )
- ENDIF(MSVC)
-ELSE(WIN32 AND NOT CYGWIN)
- FIND_LIBRARY(OPENSSL_SSL_LIBRARIES NAMES ssl ssleay32 ssleay32MD)
- FIND_LIBRARY(OPENSSL_CRYPTO_LIBRARIES NAMES crypto)
- MARK_AS_ADVANCED(OPENSSL_CRYPTO_LIBRARIES OPENSSL_SSL_LIBRARIES)
-
- SET(OPENSSL_LIBRARIES ${OPENSSL_SSL_LIBRARIES} ${OPENSSL_CRYPTO_LIBRARIES})
-
-ENDIF(WIN32 AND NOT CYGWIN)
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(OpenSSL DEFAULT_MSG
- OPENSSL_LIBRARIES
- OPENSSL_INCLUDE_DIR
-)
-
-MARK_AS_ADVANCED(OPENSSL_INCLUDE_DIR OPENSSL_LIBRARIES)
View
315 cmake/macros/FindPCHSupport.cmake
@@ -1,315 +0,0 @@
-# - Try to find precompiled headers support for GCC 3.4 and 4.x (and MSVC)
-# Once done this will define:
-#
-# Variable:
-# PCHSupport_FOUND
-#
-# Macro:
-# ADD_PRECOMPILED_HEADER _targetName _input _dowarn
-# ADD_PRECOMPILED_HEADER_TO_TARGET _targetName _input _pch_output_to_use _dowarn
-# ADD_NATIVE_PRECOMPILED_HEADER _targetName _input _dowarn
-# GET_NATIVE_PRECOMPILED_HEADER _targetName _input
-
-IF(CMAKE_COMPILER_IS_GNUCXX)
-
- EXEC_PROGRAM(
- ${CMAKE_CXX_COMPILER}
- ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion
- OUTPUT_VARIABLE gcc_compiler_version
- )
- #MESSAGE("GCC Version: ${gcc_compiler_version}")
- IF(gcc_compiler_version MATCHES "4\\.[0-9]\\.[0-9]")
- SET(PCHSupport_FOUND TRUE)
- ELSE(gcc_compiler_version MATCHES "4\\.[0-9]\\.[0-9]")
- IF(gcc_compiler_version MATCHES "3\\.4\\.[0-9]")
- SET(PCHSupport_FOUND TRUE)
- ENDIF(gcc_compiler_version MATCHES "3\\.4\\.[0-9]")
- ENDIF(gcc_compiler_version MATCHES "4\\.[0-9]\\.[0-9]")
-
- SET(_PCH_include_prefix "-I")
-
-ELSE(CMAKE_COMPILER_IS_GNUCXX)
-
- IF(WIN32)
- SET(PCHSupport_FOUND TRUE) # for experimental msvc support
- SET(_PCH_include_prefix "/I")
- ELSE(WIN32)
- SET(PCHSupport_FOUND FALSE)
- ENDIF(WIN32)
-
-ENDIF(CMAKE_COMPILER_IS_GNUCXX)
-
-MACRO(_PCH_GET_COMPILE_FLAGS _out_compile_flags)
-
- STRING(TOUPPER "CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}" _flags_var_name)
- SET(${_out_compile_flags} ${${_flags_var_name}} )
-
- IF(CMAKE_COMPILER_IS_GNUCXX)
- GET_TARGET_PROPERTY(_targetType ${_PCH_current_target} TYPE)
- IF(${_targetType} STREQUAL SHARED_LIBRARY AND NOT WIN32)
- LIST(APPEND ${_out_compile_flags} -fPIC)
- ENDIF()
-
- ELSE(CMAKE_COMPILER_IS_GNUCXX)
- ## TODO ... ? or does it work out of the box
- ENDIF(CMAKE_COMPILER_IS_GNUCXX)
-
- GET_DIRECTORY_PROPERTY(DIRINC INCLUDE_DIRECTORIES )
- FOREACH(item ${DIRINC})
- LIST(APPEND ${_out_compile_flags} "${_PCH_include_prefix}${item}")
- ENDFOREACH(item)
-
- GET_DIRECTORY_PROPERTY(_directory_flags DEFINITIONS)
- GET_DIRECTORY_PROPERTY(_global_definitions DIRECTORY ${CMAKE_SOURCE_DIR} DEFINITIONS)
- #MESSAGE("_directory_flags ${_directory_flags} ${_global_definitions}" )
- LIST(APPEND ${_out_compile_flags} ${_directory_flags})
- LIST(APPEND ${_out_compile_flags} ${_global_definitions})
- LIST(APPEND ${_out_compile_flags} ${CMAKE_CXX_FLAGS} )
-
- SEPARATE_ARGUMENTS(${_out_compile_flags})
-
-ENDMACRO(_PCH_GET_COMPILE_FLAGS)
-
-MACRO(_PCH_WRITE_PCHDEP_CXX _targetName _include_file _dephelp)
-
- SET(${_dephelp} ${CMAKE_CURRENT_BINARY_DIR}/${_targetName}_pch_dephelp.cxx)
- FILE(WRITE ${${_dephelp}}
-"#include \"${_include_file}\"
-int testfunction()
-{
- return 0;
-}
-"
- )
-
-ENDMACRO(_PCH_WRITE_PCHDEP_CXX )
-
-MACRO(_PCH_GET_COMPILE_COMMAND out_command _input _output)
-
- FILE(TO_NATIVE_PATH ${_input} _native_input)
- FILE(TO_NATIVE_PATH ${_output} _native_output)
-
-
- IF(CMAKE_COMPILER_IS_GNUCXX)
- IF(CMAKE_CXX_COMPILER_ARG1)
- # remove leading space in compiler argument
- STRING(REGEX REPLACE "^ +" "" pchsupport_compiler_cxx_arg1 ${CMAKE_CXX_COMPILER_ARG1})
-
- SET(${out_command}
- ${CMAKE_CXX_COMPILER} ${pchsupport_compiler_cxx_arg1} ${_compile_FLAGS} -x c++-header -o ${_output} ${_input}
- )
- ELSE(CMAKE_CXX_COMPILER_ARG1)
- SET(${out_command}
- ${CMAKE_CXX_COMPILER} ${_compile_FLAGS} -x c++-header -o ${_output} ${_input}
- )
- ENDIF(CMAKE_CXX_COMPILER_ARG1)
- ELSE(CMAKE_COMPILER_IS_GNUCXX)
-
- SET(_dummy_str "#include <${_input}>")
- FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/pch_dummy.cpp ${_dummy_str})
-
- SET(${out_command}
- ${CMAKE_CXX_COMPILER} ${_compile_FLAGS} /c /Fp${_native_output} /Yc${_native_input} pch_dummy.cpp
- )
- #/out:${_output}
-
- ENDIF(CMAKE_COMPILER_IS_GNUCXX)
-
-ENDMACRO(_PCH_GET_COMPILE_COMMAND )
-
-
-
-MACRO(_PCH_GET_TARGET_COMPILE_FLAGS _cflags _header_name _pch_path _dowarn )
-
- FILE(TO_NATIVE_PATH ${_pch_path} _native_pch_path)
-
- IF(CMAKE_COMPILER_IS_GNUCXX)
- # for use with distcc and gcc >4.0.1 if preprocessed files are accessible
- # on all remote machines set
- # PCH_ADDITIONAL_COMPILER_FLAGS to -fpch-preprocess
- # if you want warnings for invalid header files (which is very inconvenient
- # if you have different versions of the headers for different build types
- # you may set _pch_dowarn
- IF (_dowarn)
- SET(${_cflags} "${PCH_ADDITIONAL_COMPILER_FLAGS} -include ${CMAKE_CURRENT_BINARY_DIR}/${_header_name} -Winvalid-pch " )
- ELSE (_dowarn)
- SET(${_cflags} "${PCH_ADDITIONAL_COMPILER_FLAGS} -include ${CMAKE_CURRENT_BINARY_DIR}/${_header_name} " )
- ENDIF (_dowarn)
- ELSE(CMAKE_COMPILER_IS_GNUCXX)
-
- set(${_cflags} "/Fp${_native_pch_path} /Yu${_header_name}" )
-
- ENDIF(CMAKE_COMPILER_IS_GNUCXX)
-
-ENDMACRO(_PCH_GET_TARGET_COMPILE_FLAGS )
-
-MACRO(GET_PRECOMPILED_HEADER_OUTPUT _targetName _input _output)
- GET_FILENAME_COMPONENT(_name ${_input} NAME)
- GET_FILENAME_COMPONENT(_path ${_input} PATH)
- SET(_output "${CMAKE_CURRENT_BINARY_DIR}/${_name}.gch/${_targetName}_${CMAKE_BUILD_TYPE}.gch")
-ENDMACRO(GET_PRECOMPILED_HEADER_OUTPUT _targetName _input)
-
-
-MACRO(ADD_PRECOMPILED_HEADER_TO_TARGET _targetName _input _pch_output_to_use )
-
- # to do: test whether compiler flags match between target _targetName
- # and _pch_output_to_use
- GET_FILENAME_COMPONENT(_name ${_input} NAME)
-
- IF( "${ARGN}" STREQUAL "0")
- SET(_dowarn 0)
- ELSE( "${ARGN}" STREQUAL "0")
- SET(_dowarn 1)
- ENDIF("${ARGN}" STREQUAL "0")
-
-
- _PCH_GET_TARGET_COMPILE_FLAGS(_target_cflags ${_name} ${_pch_output_to_use} ${_dowarn})
- # MESSAGE("Add flags ${_target_cflags} to ${_targetName} " )
- SET_TARGET_PROPERTIES(${_targetName}
- PROPERTIES
- COMPILE_FLAGS ${_target_cflags}
- )
-
- ADD_CUSTOM_TARGET(pch_Generate_${_targetName}
- DEPENDS ${_pch_output_to_use}
- )
-
- ADD_DEPENDENCIES(${_targetName} pch_Generate_${_targetName} )
-
-ENDMACRO(ADD_PRECOMPILED_HEADER_TO_TARGET)
-
-MACRO(ADD_PRECOMPILED_HEADER _targetName _input)
-
- SET(_PCH_current_target ${_targetName})
-
- IF(NOT CMAKE_BUILD_TYPE)
- MESSAGE(FATAL_ERROR
- "This is the ADD_PRECOMPILED_HEADER macro. "
- "You must set CMAKE_BUILD_TYPE!"
- )
- ENDIF(NOT CMAKE_BUILD_TYPE)
-
- IF( "${ARGN}" STREQUAL "0")
- SET(_dowarn 0)
- ELSE( "${ARGN}" STREQUAL "0")
- SET(_dowarn 1)
- ENDIF("${ARGN}" STREQUAL "0")
-
- GET_FILENAME_COMPONENT(_name ${_input} NAME)
- GET_FILENAME_COMPONENT(_path ${_input} PATH)
- GET_PRECOMPILED_HEADER_OUTPUT( ${_targetName} ${_input} _output)
-
- GET_FILENAME_COMPONENT(_outdir ${_output} PATH )
-
- GET_TARGET_PROPERTY(_targetType ${_PCH_current_target} TYPE)
- _PCH_WRITE_PCHDEP_CXX(${_targetName} ${_input} _pch_dephelp_cxx)
-
- IF(${_targetType} STREQUAL SHARED_LIBRARY)
- ADD_LIBRARY(${_targetName}_pch_dephelp STATIC ${_pch_dephelp_cxx} )
- ELSE(${_targetType} STREQUAL SHARED_LIBRARY)
- ADD_LIBRARY(${_targetName}_pch_dephelp STATIC ${_pch_dephelp_cxx})
- ENDIF(${_targetType} STREQUAL SHARED_LIBRARY)
-
- FILE(MAKE_DIRECTORY ${_outdir})
-
- _PCH_GET_COMPILE_FLAGS(_compile_FLAGS)
-
- #MESSAGE("_compile_FLAGS: ${_compile_FLAGS}")
- #message("COMMAND ${CMAKE_CXX_COMPILER} ${_compile_FLAGS} -x c++-header -o ${_output} ${_input}")
- SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/${_name} PROPERTIES GENERATED 1)
- ADD_CUSTOM_COMMAND(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_name}
- COMMAND ${CMAKE_COMMAND} -E copy ${_input} ${CMAKE_CURRENT_BINARY_DIR}/${_name} # ensure same directory! Required by gcc
- DEPENDS ${_input}
- )
-
- #message("_command ${_input} ${_output}")
- _PCH_GET_COMPILE_COMMAND(_command ${CMAKE_CURRENT_BINARY_DIR}/${_name} ${_output} )
-
- #message(${_input} )
- #message("_output ${_output}")
-
- ADD_CUSTOM_COMMAND(
- OUTPUT ${_output}
- COMMAND ${_command}
- DEPENDS ${_input} ${CMAKE_CURRENT_BINARY_DIR}/${_name} ${_targetName}_pch_dephelp
- )
-
- ADD_PRECOMPILED_HEADER_TO_TARGET(${_targetName} ${_input} ${_output} ${_dowarn})
-ENDMACRO(ADD_PRECOMPILED_HEADER)
-
-# Generates the use of precompiled in a target,
-# without using depency targets (2 extra for each target)
-# Using Visual, must also add ${_targetName}_pch to sources
-# Not needed by Xcode
-
-MACRO(GET_NATIVE_PRECOMPILED_HEADER _targetName _input)
-
- if(CMAKE_GENERATOR MATCHES Visual*)
-
- SET(_dummy_str "#include \"${_input}\"\n"
- "// This is required to suppress LNK4221. Very annoying.\n"
- "void *g_${_targetName}Dummy = 0\;\n")
-
- # Use of cxx extension for generated files (as Qt does)
- SET(${_targetName}_pch ${CMAKE_CURRENT_BINARY_DIR}/${_targetName}_pch.cxx)
- if(EXISTS ${${_targetName}_pch})
- # Check if contents is the same, if not rewrite
- # todo
- else(EXISTS ${${_targetName}_pch})
- FILE(WRITE ${${_targetName}_pch} ${_dummy_str})
- endif(EXISTS ${${_targetName}_pch})
- endif(CMAKE_GENERATOR MATCHES Visual*)
-
-ENDMACRO(GET_NATIVE_PRECOMPILED_HEADER)
-
-MACRO(ADD_NATIVE_PRECOMPILED_HEADER _targetName _input)
-
- IF( "${ARGN}" STREQUAL "0")
- SET(_dowarn 0)
- ELSE( "${ARGN}" STREQUAL "0")
- SET(_dowarn 1)
- ENDIF("${ARGN}" STREQUAL "0")
-
- if(CMAKE_GENERATOR MATCHES Visual*)
- # Auto include the precompile (useful for moc processing, since the use of
- # precompiled is specified at the target level
- # and I don't want to specifiy /F- for each moc/res/ui generated files (using Qt)
-
- GET_TARGET_PROPERTY(oldProps ${_targetName} COMPILE_FLAGS)
- if (${oldProps} MATCHES NOTFOUND)
- SET(oldProps "")
- endif(${oldProps} MATCHES NOTFOUND)
-
- SET(newProperties "${oldProps} /Yu\"${_input}.h\" /FI\"${_input}.h\"")
- SET_TARGET_PROPERTIES(${_targetName} PROPERTIES COMPILE_FLAGS "${newProperties}")
-
- #also inlude ${oldProps} to have the same compile options
- SET_SOURCE_FILES_PROPERTIES(${_input}.cpp PROPERTIES COMPILE_FLAGS "${oldProps} /Yc\"${_input}.h\"")
-
- else(CMAKE_GENERATOR MATCHES Visual*)
-
- if (CMAKE_GENERATOR MATCHES Xcode)
- # For Xcode, cmake needs my patch to process
- # GCC_PREFIX_HEADER and GCC_PRECOMPILE_PREFIX_HEADER as target properties
-
- GET_TARGET_PROPERTY(oldProps ${_targetName} COMPILE_FLAGS)
- if (${oldProps} MATCHES NOTFOUND)
- SET(oldProps "")
- endif(${oldProps} MATCHES NOTFOUND)
-
- # When buiding out of the tree, precompiled may not be located
- # Use full path instead.
- GET_FILENAME_COMPONENT(fullPath ${_input} ABSOLUTE)
-
- SET_TARGET_PROPERTIES(${_targetName} PROPERTIES XCODE_ATTRIBUTE_GCC_PREFIX_HEADER "${fullPath}")
- SET_TARGET_PROPERTIES(${_targetName} PROPERTIES XCODE_ATTRIBUTE_GCC_PRECOMPILE_PREFIX_HEADER "YES")
-
- else (CMAKE_GENERATOR MATCHES Xcode)
-
- #Fallback to the "old" precompiled suppport
- #ADD_PRECOMPILED_HEADER(${_targetName} ${_input} ${_dowarn})
- endif(CMAKE_GENERATOR MATCHES Xcode)
- endif(CMAKE_GENERATOR MATCHES Visual*)
-
-ENDMACRO(ADD_NATIVE_PRECOMPILED_HEADER)
View
18 cmake/macros/FindReadline.cmake
@@ -1,18 +0,0 @@
-# find Readline (terminal input library) includes and library
-#
-# READLINE_INCLUDE_DIR - where the directory containing the READLINE headers can be found
-# READLINE_LIBRARY - full path to the READLINE library
-# READLINE_FOUND - TRUE if READLINE was found
-
-FIND_PATH(READLINE_INCLUDE_DIR readline/readline.h)
-FIND_LIBRARY(READLINE_LIBRARY NAMES readline)
-
-IF (READLINE_INCLUDE_DIR AND READLINE_LIBRARY)
- SET(READLINE_FOUND TRUE)
- MESSAGE(STATUS "Found Readline library: ${READLINE_LIBRARY}")
- MESSAGE(STATUS "Include dir is: ${READLINE_INCLUDE_DIR}")
- INCLUDE_DIRECTORIES(${READLINE_INCLUDE_DIR})
-ELSE (READLINE_INCLUDE_DIR AND READLINE_LIBRARY)
- SET(READLINE_FOUND FALSE)
- MESSAGE(FATAL_ERROR "** Readline library not found!\n** Your distro may provide a binary for Readline e.g. for ubuntu try apt-get install libreadline5-dev")
-ENDIF (READLINE_INCLUDE_DIR AND READLINE_LIBRARY)
View
17 cmake/options.cmake
@@ -1,17 +0,0 @@
-# Copyright (C) 2008-2012 Trinity <http://www.trinitycore.org/>
-#
-# This file is free software; as a special exception the author gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-option(SERVERS "Build worldserver and authserver" 1)
-option(SCRIPTS "Build core with scripts included" 1)
-option(TOOLS "Build map/vmap extraction/assembler tools" 0)
-option(USE_SCRIPTPCH "Use precompiled headers when compiling scripts" 1)
-option(USE_COREPCH "Use precompiled headers when compiling servers" 1)
-option(WITH_WARNINGS "Show all warnings during compile" 0)
-option(WITH_COREDEBUG "Include additional debug-code in core" 0)
View
23 cmake/platform/cmake_uninstall.in.cmake
@@ -1,23 +0,0 @@
-# from cmake wiki
-IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
- MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
-ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
-
-FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
-STRING(REGEX REPLACE "\n" ";" files "${files}")
-FOREACH(file ${files})
- MESSAGE(STATUS "Uninstalling \"${file}\"")
- IF(EXISTS "${file}")
- EXEC_PROGRAM(
- "@CMAKE_COMMAND@" ARGS "-E remove \"${file}\""
- OUTPUT_VARIABLE rm_out
- RETURN_VALUE rm_retval
- )
- IF("${rm_retval}" STREQUAL 0)
- ELSE("${rm_retval}" STREQUAL 0)
- MESSAGE(FATAL_ERROR "Problem when removing \"${file}\"")
- ENDIF("${rm_retval}" STREQUAL 0)
- ELSE(EXISTS "${file}")
- MESSAGE(STATUS "File \"${file}\" does not exist.")
- ENDIF(EXISTS "${file}")
-ENDFOREACH(file)
View
31 cmake/platform/osx/settings.cmake
@@ -1,31 +0,0 @@
-set(MACOSX 1)
-set(OSX_LIBS /usr/lib/libcrypto.dylib)
-add_definitions(-D__ASSERTMACROS__)
-
-# set default configuration directory
-if( NOT CONF_DIR )
- set(CONF_DIR ${CMAKE_INSTALL_PREFIX}/etc)
- message(STATUS "OSX: Using default configuration directory")
-endif()
-
-# set default library directory
-if( NOT LIBSDIR )
- set(LIBSDIR ${CMAKE_INSTALL_PREFIX}/lib)
- message(STATUS "OSX: Using default library directory")
-endif()
-
-# configure uninstaller
-configure_file(
- "${CMAKE_SOURCE_DIR}/cmake/platform/cmake_uninstall.in.cmake"
- "${CMAKE_BINARY_DIR}/cmake_uninstall.cmake"
- IMMEDIATE @ONLY
-)
-message(STATUS "OSX: Configuring uninstall target")
-
-# create uninstaller target (allows for using "make uninstall")
-add_custom_target(uninstall
- "${CMAKE_COMMAND}" -P "${CMAKE_BINARY_DIR}/cmake_uninstall.cmake"
-)
-message(STATUS "OSX: Created uninstall target")
-
-include(${CMAKE_SOURCE_DIR}/cmake/compiler/xcode/settings.cmake)
View
5 cmake/platform/settings.cmake
@@ -1,5 +0,0 @@
-# set installation prefix
-if( PREFIX )
- set(CMAKE_INSTALL_PREFIX "${PREFIX}")
-endif()
-
View
38 cmake/platform/unix/settings.cmake
@@ -1,38 +0,0 @@
-# Package overloads - Linux
-if(CMAKE_SYSTEM_NAME MATCHES "Linux")
- if (NOT NOJEM)
- set(JEMALLOC_LIBRARY "jemalloc")
- endif()
-endif()
-
-# set default configuration directory
-if( NOT CONF_DIR )
- set(CONF_DIR ${CMAKE_INSTALL_PREFIX}/etc)
- message(STATUS "UNIX: Using default configuration directory")
-endif()
-
-# set default library directory
-if( NOT LIBSDIR )
- set(LIBSDIR ${CMAKE_INSTALL_PREFIX}/lib)
- message(STATUS "UNIX: Using default library directory")
-endif()
-
-# configure uninstaller
-configure_file(
- "${CMAKE_SOURCE_DIR}/cmake/platform/cmake_uninstall.in.cmake"
- "${CMAKE_BINARY_DIR}/cmake_uninstall.cmake"
- @ONLY
-)
-message(STATUS "UNIX: Configuring uninstall target")
-
-# create uninstaller target (allows for using "make uninstall")
-add_custom_target(uninstall
- "${CMAKE_COMMAND}" -P "${CMAKE_BINARY_DIR}/cmake_uninstall.cmake"
-)
-message(STATUS "UNIX: Created uninstall target")
-
-if(CMAKE_C_COMPILER MATCHES "gcc")
- include(${CMAKE_SOURCE_DIR}/cmake/compiler/gcc/settings.cmake)
-elseif(CMAKE_C_COMPILER MATCHES "icc")
- include(${CMAKE_SOURCE_DIR}/cmake/compiler/icc/settings.cmake)
-endif()
View
28 cmake/platform/win/settings.cmake
@@ -1,28 +0,0 @@
-# Platform-specfic options
-option(USE_MYSQL_SOURCES "Use included MySQL-sources to build libraries" 1)
-
-# Package overloads
-set(ACE_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/dep/acelite)
-set(ACE_LIBRARY "ace")
-set(BZIP2_LIBRARIES "bzip2")
-set(ZLIB_LIBRARIES "zlib")
-
-if( USE_MYSQL_SOURCES )
- set(MYSQL_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/dep/mysqllite/include)
- set(MYSQL_LIBRARY "libmysql")
- set( MYSQL_FOUND 1 )
- message(STATUS "Using supplied MySQL sources")
-endif()
-
-# check the CMake preload parameters (commented out by default)
-
-# overload CMAKE_INSTALL_PREFIX if not being set properly
-#if( WIN32 )
-# if( NOT CYGWIN )
-# if( NOT CMAKE_INSTALL_PREFIX )
-# set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/bin")
-# endif()
-# endif()
-#endif()
-
-include(${CMAKE_SOURCE_DIR}/cmake/compiler/msvc/settings.cmake)
View
80 cmake/showoptions.cmake
@@ -1,80 +0,0 @@
-# output generic information about the core and buildtype chosen
-message("")
-message("* TrinityCore rev. hash : ${rev_hash}")
-message("* TrinityCore rev. date : ${rev_date}")
-if( UNIX )
- message("* TrinityCore buildtype : ${CMAKE_BUILD_TYPE}")
-endif()
-message("")
-
-# output information about installation-directories and locations
-
-message("* Install core to : ${CMAKE_INSTALL_PREFIX}")
-if( UNIX )
- message("* Install libraries to : ${LIBSDIR}")
- message("* Install configs to : ${CONF_DIR}")
-endif()
-message("")
-
-# Show infomation about the options selected during configuration
-
-if( SERVERS )
- message("* Build world/auth : Yes (default)")
-else()
- message("* Build world/authserver : No")
-endif()
-
-if( SCRIPTS )
- message("* Build with scripts : Yes (default)")
- add_definitions(-DSCRIPTS)
-else()
- message("* Build with scripts : No")
- set(USE_SCRIPTPCH 0)
-endif()
-
-if( TOOLS )
- message("* Build map/vmap tools : Yes")
-else()
- message("* Build map/vmap tools : No (default)")
-endif()
-
-if( USE_COREPCH )
- message("* Build core w/PCH : Yes (default)")
-else()
- message("* Build core w/PCH : No")
-endif()
-
-if( USE_SCRIPTPCH )
- message("* Build scripts w/PCH : Yes (default)")
-else()
- message("* Build scripts w/PCH : No")
-endif()
-
-if( WITH_WARNINGS )
- message("* Show all warnings : Yes")
-else()
- message("* Show compile-warnings : No (default)")
-endif()
-
-if( WITH_COREDEBUG )
- message("* Use coreside debug : Yes")
- add_definitions(-DTRINITY_DEBUG)
-else()
- message("* Use coreside debug : No (default)")
-endif()
-
-if( WIN32 )
- if( USE_MYSQL_SOURCES )
- message("* Use MySQL sourcetree : Yes (default)")
- else()
- message("* Use MySQL sourcetree : No")
- endif()
-endif( WIN32 )
-
-if ( NOJEM )
- message("")
- message("*** WARNING: jemalloc linking has been disabled!")
- message("*** Please note that this is for DEBUGGING WITH VALGRIND only!")
- message("*** DO NOT DISABLE IT UNLESS YOU KNOW WHAT YOU'RE DOING!")
-endif()
-message("")
View
20 contrib/ScriptsConverter/ScriptConverter.sln
@@ -1,20 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ScriptConverter", "ScriptConverter\ScriptConverter.csproj", "{AB4C10BF-53AD-44AC-8B7A-B3F406DF468A}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {AB4C10BF-53AD-44AC-8B7A-B3F406DF468A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {AB4C10BF-53AD-44AC-8B7A-B3F406DF468A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {AB4C10BF-53AD-44AC-8B7A-B3F406DF468A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {AB4C10BF-53AD-44AC-8B7A-B3F406DF468A}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
View
226 contrib/ScriptsConverter/ScriptConverter/Program.cs
@@ -1,226 +0,0 @@
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.IO;
-
-namespace ScriptConverter {
- class Program {
- static void Main(string[] args) {
- if (args.Length != 1) {
- Console.WriteLine("Usage: ScriptsConverter.exe [path_to_dir|path_to_file]");
- } else {
- string path = args[0];
- if (File.Exists(path)) {
- ProcessFile(path);
- } else if (Directory.Exists(path)) {
- ProcessDirectory(path);
- } else {
- Console.WriteLine("Invalid file or directory specified.\r\n\r\nUsage: ScriptsConverter.exe [path_to_dir|path_to_file]");
- }
- }
- }
-
- static void ProcessDirectory(string path) {
- string[] files = Directory.GetFiles(path, "*.cpp");
- foreach (string file in files) {
- ProcessFile(file);
- }
- string[] dirs = Directory.GetDirectories(path);
- foreach (string dir in dirs) {
- ProcessDirectory(dir);
- }
- }
-
- class ScriptData {
- public int type = 0;
- public string name;
- public ArrayList methods = new ArrayList();
- public string instanceName = null;
- public string aiName = null;
- public string[] special = new string[] { "GetAI_", "GetInstance_", "GetInstanceData_" };
-
- public void AddMethod(string method) {
- methods.Add(method);
- int i = 0;
- foreach (string s in special) {
- ++i;
- int pos = method.IndexOf(s);
- if (pos != -1) {
- type = i;
- string name = method.Substring(pos + s.Length);
- if (i == 1) {
- aiName = name + "AI";
- }
- if (i == 2 || i == 3)
- instanceName = name;
- }
- }
- }
-
- public override string ToString() {
- StringBuilder sb = new StringBuilder();
- sb.AppendFormat("Script: {0}\n", name);
- foreach (string method in methods)
- sb.Append(" ").Append(method).Append("\n");
- sb.Append("\n");
- return sb.ToString();
- }
- }
-
- static string GetMethod(string method, ref string txt, ref int minPos) {
- string res = null;
- Regex r = new Regex(method + "(\\s|:|[(])");
- Match m = r.Match(txt);
- if (m.Success) {
- int pos = m.Index;
- while (pos-- >= 0 && pos < txt.Length) {
- if (txt[pos] == '\n') break;
- }
- //pos++;
- int lastPos = txt.IndexOf("\n}", pos);
- if (lastPos != -1) {
- lastPos += 2;
- while (lastPos++ >= 0 && lastPos < txt.Length) {
- if (txt[lastPos] == '\n') break;
- }
- res = txt.Substring(pos, lastPos - pos);
- txt = txt.Remove(pos, lastPos - pos);
- }
- if (pos < minPos)
- minPos = pos;
- }
- return res;
- }
-
- static void ProcessFile(string filePath) {
- Console.WriteLine(filePath);
-
- string txt = File.ReadAllText(filePath);
- string[] lines = File.ReadAllLines(filePath);
- Array.Reverse(lines);
-
- ArrayList scripts = new ArrayList();
- ScriptData data = null;
- bool scriptStart = false;
- foreach (string line in lines) {
- if (line.IndexOf("Script *") != -1) {
- break;
- }
- if (line.IndexOf("->RegisterSelf();") != -1) {
- scriptStart = true;
- data = new ScriptData();
- continue;
- }
- if (scriptStart) {
- if (line.IndexOf("= new Script") != -1) {
- scriptStart = false;
- scripts.Add(data);
- data = null;
- continue;
- }
- Regex r = new Regex("newscript->([a-zA-Z]+) *= *&?([\"_a-zA-Z0-9]+);");
- Match m = r.Match(line);
- if (m.Success) {
- if (m.Groups[1].Value.Equals("Name")) {
- data.name = m.Groups[2].Value.Trim(new char[] { '"' });
- } else {
- data.AddMethod(m.Groups[2].Value);
- }
- }
- continue;
- }
- }
- if (scripts.Count != 0) {
- string register = "";
- foreach (ScriptData sd in scripts) {
- string ss = "";
- Console.WriteLine(sd);
- int minPos = txt.Length;
- foreach (string method in sd.methods) {
- string s = GetMethod(method, ref txt, ref minPos);
- ss += s + "\n";
- }
- if (sd.instanceName != null) {
- string s = GetMethod("struct " + sd.instanceName, ref txt, ref minPos);
- ss += s + "\n";
- }
- if (sd.aiName != null) {
- string ai = GetMethod("struct " + sd.aiName, ref txt, ref minPos);
- if (ai != null) {
- string sm = null;
- Regex r = new Regex("\\S+ " + sd.aiName + "::([^( ]+)");
- while (r.IsMatch(txt)) {
- Match m = r.Match(txt);
- int startPos = m.Index;
- int endPos = txt.IndexOf("\n}", startPos);
- if (endPos != -1)
- endPos += 2;
- while (endPos++ >= 0 && endPos < txt.Length) {
- if (txt[endPos] == '\n') break;
- }
- sm = txt.Substring(startPos, endPos - startPos);
- txt = txt.Remove(startPos, endPos - startPos);
- if (sm != null) {
- sm = sm.Replace("\n", "\n ");
- Regex r1 = new Regex("\\S+ " + m.Groups[1] + " *\\([^)]*\\) *;");
- Match m1 = r1.Match(ai);
- if (m1.Success) {
- ai = r1.Replace(ai, sm);
- }
- }
- }
- ai = ai.Replace(sd.aiName + "::", "");
- ss += ai + "\n";
- }
- }
- if (ss.Length != 0) {
- string typeName = "UnknownScript";
- switch (sd.type) {
- case 1: typeName = "CreatureScript"; break;
- case 2: typeName = "InstanceMapScript"; break;
- default:
- if (sd.name.IndexOf("npc") == 0)
- typeName = "CreatureScript";
- else if (sd.name.IndexOf("mob") == 0)
- typeName = "CreatureScript";
- else if (sd.name.IndexOf("boss_") == 0)
- typeName = "CreatureScript";
- else if (sd.name.IndexOf("item_") == 0)
- typeName = "ItemScript";
- else if (sd.name.IndexOf("go_") == 0)
- typeName = "GameObjectScript";
- else if (sd.name.IndexOf("at_") == 0)
- typeName = "AreaTriggerScript";
- else if (sd.name.IndexOf("instance_") == 0)
- typeName = "InstanceMapScript";
- break;
- }
- if (sd.instanceName != null)
- ss = ss.Replace(sd.instanceName, sd.instanceName + "_InstanceMapScript");
- ss = ss.Replace("\n", "\n ");
- ss = "class " + sd.name + " : public " + typeName + "\n{\npublic:\n " +
- sd.name + "() : " + typeName + "(\"" + sd.name + "\") { }\n" + ss + "\n};";
- ss = ss.Replace("_" + sd.name, "");
- ss = ss.Replace("AIAI", "AI");
- ss = ss.Replace(" \r\n", "\r\n");
- ss = ss.Replace(" \n", "\n");
- txt = txt.Insert(minPos, ss);
- register = " new " + sd.name + "();\n" + register;
- }
- }
- Regex r2 = new Regex("void +AddSC_([_a-zA-Z0-9]+)");
- Match m2 = r2.Match(txt);
- if (m2.Success) {
- txt = txt.Remove(m2.Index);
- txt += "void AddSC_" + m2.Groups[1].Value + "()\n{\n" + register + "}\n";
- }
- // File.Copy(filePath, filePath + ".bkp");
- txt = txt.Replace("\r\n", "\n");
- File.WriteAllText(filePath, txt);
- }
- }
- }
-}
View
36 contrib/ScriptsConverter/ScriptConverter/Properties/AssemblyInfo.cs
@@ -1,36 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("ScriptConverter")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("ScriptConverter")]
-[assembly: AssemblyCopyright("Copyright © 2010")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("39b64a0a-a460-4177-925f-b9bdda4f2a1d")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
View
59 contrib/ScriptsConverter/ScriptConverter/ScriptConverter.csproj
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.21022</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{AB4C10BF-53AD-44AC-8B7A-B3F406DF468A}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>ScriptConverter</RootNamespace>
- <AssemblyName>ScriptConverter</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">