diff options
author | flaviojs <flaviojs@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-07-13 01:58:32 +0000 |
---|---|---|
committer | flaviojs <flaviojs@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-07-13 01:58:32 +0000 |
commit | ce4806100ca775d9086115f7f57beb0138f8c2f1 (patch) | |
tree | 6b48ef737da20ed3205feab7428b5455ae711f99 /CMakeLists.txt | |
parent | a0383842abeb49c65c05832b51161dfaecc67fcb (diff) | |
download | hercules-ce4806100ca775d9086115f7f57beb0138f8c2f1.tar.gz hercules-ce4806100ca775d9086115f7f57beb0138f8c2f1.tar.bz2 hercules-ce4806100ca775d9086115f7f57beb0138f8c2f1.tar.xz hercules-ce4806100ca775d9086115f7f57beb0138f8c2f1.zip |
* CMake: added search for ws2_32 library. (tested with MinGW/MSYS)
* Added missing pcre library for MinGW.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14904 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 41752f489..2960b822d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,10 +41,12 @@ elseif( "${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}" ) "Do not use the source directory to build your files, instead delete CMakeCache.txt, create a separate folder and build there.\n" "Example: (build in subdir 'build' and install to source dir)\n" " rm -f CMakeCache.txt\n" - " mkdir build && cd build\n" + " mkdir build\n" + " cd build\n" " cmake -G\"Unix Makefiles\" -DINSTALL_TO_SOURCE=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo ..\n" " make install\n" - " cd .. && rm -rf build\n" + " cd ..\n" + " rm -rf build\n" "To skip this check, set ALLOW_SAME_DIRECTORY to ON (-DALLOW_SAME_DIRECTORY=ON)" ) endif() @@ -58,9 +60,9 @@ set( GLOBAL_DEFINITIONS ${COMPILE_DEFINITIONS} CACHE INTERNAL "" )# string (spa mark_as_advanced( GLOBAL_LIBRARIES GLOBAL_INCLUDE_DIRS GLOBAL_DEFINITIONS ) if( WIN32 ) set_property( CACHE GLOBAL_DEFINITIONS PROPERTY VALUE "${GLOBAL_DEFINITIONS} -DFD_SETSIZE=4096" ) - set_property( CACHE GLOBAL_LIBRARIES PROPERTY VALUE ${GLOBAL_LIBRARIES} "oldnames.lib" "ws2_32.lib" ) endif() if( MSVC ) + set_property( CACHE GLOBAL_LIBRARIES PROPERTY VALUE ${GLOBAL_LIBRARIES} "oldnames.lib" "ws2_32.lib" ) set_property( CACHE GLOBAL_DEFINITIONS PROPERTY VALUE "${GLOBAL_DEFINITIONS} -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DDB_MANUAL_CAST_TO_UNION" ) endif() @@ -158,12 +160,12 @@ endif() # -# socket/nsl library (Solaris) +# socket/nsl/ws2_32 library (Solaris/MinGW) # -if( NOT WIN32 ) -message( STATUS "Detecting socket/nsl library (networking)" ) +if( NOT MSVC ) +message( STATUS "Detecting socket/nsl/ws2_32 library (networking)" ) set( CMAKE_REQUIRED_LIBRARIES ${GLOBAL_LIBRARIES} ) -find_function_library( bind FUNCTION_BIND_LIBRARIES socket ) +find_function_library( bind FUNCTION_BIND_LIBRARIES socket ws2_32 ) if( FUNCTION_BIND_LIBRARIES ) message( STATUS "Adding global library: ${FUNCTION_BIND_LIBRARIES}" ) list( APPEND GLOBAL_LIBRARIES ${FUNCTION_BIND_LIBRARIES} ) @@ -174,7 +176,7 @@ if( FUNCTION_GETHOSTBYNAME_LIBRARIES ) message( STATUS "Adding global library: ${FUNCTION_GETHOSTBYNAME_LIBRARIES}" ) list( APPEND GLOBAL_LIBRARIES ${FUNCTION_GETHOSTBYNAME_LIBRARIES} ) endif() -message( STATUS "Detecting socket/nsl library (networking) - done" ) +message( STATUS "Detecting socket/nsl/ws2_32 library (networking) - done" ) endif() |