소스 검색

* CMake: lowered required version to 2.8.3 and moved custom cmake modules to 3rdparty/cmake.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14897 54d463be-8e91-2dee-dedb-b68131a5f0ec
flaviojs 14 년 전
부모
커밋
e3dc463655
7개의 변경된 파일27개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 0
      3rdparty/CMakeLists.txt
  2. 0 0
      3rdparty/cmake/FindMYSQL.cmake
  3. 0 0
      3rdparty/cmake/FindPCRE.cmake
  4. 0 1
      3rdparty/mysql/CMakeLists.txt
  5. 0 1
      3rdparty/pcre/CMakeLists.txt
  6. 25 2
      CMakeLists.txt
  7. 1 0
      Changelog-Trunk.txt

+ 1 - 0
3rdparty/CMakeLists.txt

@@ -47,6 +47,7 @@ macro( CONFIGURE_WITH_LOCAL_OR_SYSTEM name )
 endmacro( CONFIGURE_WITH_LOCAL_OR_SYSTEM )
 
 
+set( CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH} )
 add_subdirectory( msinttypes )
 add_subdirectory( mt19937ar )
 add_subdirectory( mysql )

+ 0 - 0
3rdparty/mysql/FindMYSQL.cmake → 3rdparty/cmake/FindMYSQL.cmake


+ 0 - 0
3rdparty/pcre/FindPCRE.cmake → 3rdparty/cmake/FindPCRE.cmake


+ 0 - 1
3rdparty/mysql/CMakeLists.txt

@@ -44,7 +44,6 @@ endif( WIN32 )
 message( STATUS "Detecting system MYSQL" )
 unset( MYSQL_LIBRARIES CACHE )
 unset( MYSQL_INCLUDE_DIRS CACHE )
-set( CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_MODULE_PATH} )
 find_package( MYSQL )
 set( MYSQL_SYSTEM_LIBRARIES "${MYSQL_LIBRARIES}"
 	CACHE PATH "system mysql libraries" )

+ 0 - 1
3rdparty/pcre/CMakeLists.txt

@@ -39,7 +39,6 @@ endif( WIN32 )
 # system
 #
 message( STATUS "Detecting system PCRE" )
-set( CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_MODULE_PATH} )
 unset( PCRE_LIBRARIES CACHE )
 unset( PCRE_INCLUDE_DIRS CACHE )
 find_package( PCRE )

+ 25 - 2
CMakeLists.txt

@@ -1,3 +1,5 @@
+#####################################################################
+#
 # "Getting Started with CMake", a tutorial video by Eric Wing.
 #   Part 1 of 6: http://www.youtube.com/watch?v=CLvZTyji_Uw
 #   Part 2 of 6: http://www.youtube.com/watch?v=gUW-RrRQjEg
@@ -11,8 +13,30 @@
 #   WITH_*   : option to use an external package or not
 #   ENABLE_* : option to use an internal feature/code or not
 #   HAVE_*   : internal variable indicating if we have and are using something
-cmake_minimum_required( VERSION 2.8.4 )
+#
+# Example (build in subdir 'build' and install to source dir):
+#   mkdir build
+#   cd build
+#   cmake -G"Unix Makefiles" -DINSTALL_TO_SOURCE:bool=ON ..
+#   make install
+#   cd ..
+#   rm -rf build
+#
+#####################################################################
+
+
+#cmake_minimum_required( VERSION 2.8.4 )
+# Functional changes from 2.8.3 to 2.8.4:
+#   string(SUBSTRING) works with length -1 as "rest of string"
+#   changes to some CPack generators
+#   CYGWIN no longer defines WIN32
+#   CMP0017: Prefer files from the CMake module directory when including from there.
+set( CMAKE_LEGACY_CYGWIN_WIN32 0 )
+cmake_minimum_required( VERSION 2.8.3 )
 project( eAthena )
+if( CYGWIN )
+	unset( WIN32 )
+endif()
 
 
 #
@@ -261,5 +285,4 @@ endif()
 #
 # subdirectories
 #
-add_subdirectory( 3rdparty )
 add_subdirectory( src )

+ 1 - 0
Changelog-Trunk.txt

@@ -2,6 +2,7 @@ Date	Added
 
 2011/07/10
 	* Temporary fix for bugreport:4961 (unintended conversion from signed to unsigned). [FlavioJS]
+	* CMake: lowered required version to 2.8.3 and moved custom cmake modules to 3rdparty/cmake.
 2011/07/09
 	* Added script command 'getmercinfo' for retrieving information about a mercenary of an online character. [Ai4rei]
 	* CMake: added search for math library, made CPack existence optional, updated the search for mysqlclient and corrected misspelled variables (tested with FreeBSD-8.2-i386) [FlavioJS]