Browse Source

cmake: solaris fixes.

v0.7.4-release
Tom Hughes 14 years ago
committed by Ryan Dahl
parent
commit
e681abe5cb
  1. 11
      cmake/libs.cmake
  2. 4
      cmake/package.cmake
  3. 4
      cmake/v8_build.cmake
  4. 18
      deps/c-ares/CMakeLists.txt

11
cmake/libs.cmake

@ -2,6 +2,7 @@
# libraries
#
include(CheckLibraryExists)
include(FindPackageHandleStandardArgs)
set(HAVE_CONFIG_H True)
add_definitions(-DHAVE_CONFIG_H=1)
@ -10,6 +11,8 @@ find_package(OpenSSL QUIET)
find_package(Threads)
find_library(RT rt)
find_library(DL dl)
check_library_exists(socket socket "" HAVE_SOCKET_LIB)
check_library_exists(nsl gethostbyname "" HAVE_NSL_LIB)
if(RT)
set(extra_libs ${extra_libs} ${RT})
@ -24,6 +27,14 @@ if(${node_platform} MATCHES freebsd)
set(extra_libs ${extra_libs} KVM)
endif()
if(${HAVE_SOCKET_LIB})
set(extra_libs ${extra_libs} socket)
endif()
if(${HAVE_NSL_LIB})
set(extra_libs ${extra_libs} nsl)
endif()
if(${OPENSSL_FOUND} MATCHES True)
add_definitions(-DHAVE_OPENSSL=1)
set(HAVE_OPENSSL True)

4
cmake/package.cmake

@ -10,8 +10,10 @@ if(${node_platform} MATCHES darwin)
set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_BINARY_DIR}/LICENSE.txt")
set(CPACK_RESOURCE_FILE_README "${PROJECT_BINARY_DIR}/ChangeLog.txt")
#set(CPACK_RESOURCE_FILE_WELCOME "")
else()
elseif(${node_platform} MATCHES linux)
set(CPACK_GENERATOR "TGZ;DEB;RPM")
else()
set(CPACK_GENERATOR "TGZ")
endif()
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Tom Hughes <tom.hughes@palm.com>")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Evented I/O for V8 JavaScript.")

4
cmake/v8_build.cmake

@ -22,6 +22,10 @@ if(NOT SHARED_V8)
elseif(${node_platform} MATCHES linux)
execute_process(COMMAND sh -c "cat /proc/cpuinfo | grep processor | sort | uniq | wc -l"
OUTPUT_VARIABLE cpu_count)
elseif(${node_platform} MATCHES sunos)
execute_process(COMMAND sh -c "psrinfo | wc -l" OUTPUT_VARIABLE cpu_count)
else()
set(cpu_count 1)
endif()
if(${cpu_count} GREATER 1)

18
deps/c-ares/CMakeLists.txt

@ -2,5 +2,21 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${node_platform}-${cares_arch})
add_definitions(-DHAVE_CONFIG_H=1)
include(CheckLibraryExists)
check_library_exists(socket socket "" HAVE_SOCKET_LIB)
check_library_exists(nsl gethostbyname "" HAVE_NSL_LIB)
file(GLOB lib_sources *.c)
add_library(cares ${lib_sources})
add_library(cares ${lib_sources})
if(${HAVE_SOCKET_LIB})
set(cares_libs ${cares_libs} socket)
endif()
if(${HAVE_NSL_LIB})
set(cares_libs ${cares_libs} nsl)
endif()
if(cares_libs)
target_link_libraries(cares ${cares_libs})
endif()

Loading…
Cancel
Save