diff options
author | Tom Hughes <tom.hughes@palm.com> | 2010-11-29 21:02:06 +0300 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2010-12-02 21:36:10 +0300 |
commit | e681abe5cbcb58fb71baad1190135961fe39ebc7 (patch) | |
tree | b2bdc3ce6c0a640413c56e0c2ca2f5b476972fdc /cmake | |
parent | cf1811a6d3f19e8922fa205c77e216ce7981c5e3 (diff) |
cmake: solaris fixes.
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/libs.cmake | 11 | ||||
-rw-r--r-- | cmake/package.cmake | 4 | ||||
-rw-r--r-- | cmake/v8_build.cmake | 4 |
3 files changed, 18 insertions, 1 deletions
diff --git a/cmake/libs.cmake b/cmake/libs.cmake index e953bbe3273..2844d86ac0d 100644 --- a/cmake/libs.cmake +++ b/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) diff --git a/cmake/package.cmake b/cmake/package.cmake index 7f6c3cfcc65..720e2dd7557 100644 --- a/cmake/package.cmake +++ b/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.") diff --git a/cmake/v8_build.cmake b/cmake/v8_build.cmake index d2bb76fb9ff..ea27e5fd083 100644 --- a/cmake/v8_build.cmake +++ b/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) |