Merge pull request #906 from knnniggett/solaris_cmake
Solaris cmake Looks good to me
This commit is contained in:
commit
c0c02f0d6f
|
@ -31,6 +31,27 @@ endif(NOT CMAKE_BUILD_TYPE)
|
|||
#set(CMAKE_VERBOSE_MAKEFILE ON)
|
||||
#set(CMAKE_INSTALL_ALWAYS ON)
|
||||
|
||||
# Host OS Check
|
||||
set(HOST_OS "")
|
||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
set(HOST_OS "linux")
|
||||
endif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES ".*(SunOS|Solaris).*")
|
||||
set(HOST_OS "solaris")
|
||||
set(SOLARIS 1)
|
||||
endif(${CMAKE_SYSTEM_NAME} MATCHES ".*(SunOS|Solaris).*")
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES ".*BSD.*")
|
||||
set(HOST_OS "BSD")
|
||||
set(BSD 1)
|
||||
endif(${CMAKE_SYSTEM_NAME} MATCHES ".*BSD.*")
|
||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
|
||||
set(HOST_OS "darwin")
|
||||
endif(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
|
||||
if(NOT HOST_OS)
|
||||
message(FATAL_ERROR
|
||||
"ZoneMinder was unable to deterimine the host OS. Please report this. Value of CMAKE_SYSTEM_NAME: ${CMAKE_SYSTEM_NAME}")
|
||||
endif(NOT HOST_OS)
|
||||
|
||||
# Default CLFAGS and CXXFLAGS:
|
||||
set(CMAKE_C_FLAGS_RELEASE "-Wall -D__STDC_CONSTANT_MACROS -O2")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-Wall -D__STDC_CONSTANT_MACROS -O2")
|
||||
|
@ -163,27 +184,6 @@ include_directories("${CMAKE_BINARY_DIR}")
|
|||
# This is required to enable searching in lib64 (if exists), do not change
|
||||
set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS ON)
|
||||
|
||||
# Host OS Check
|
||||
set(HOST_OS "")
|
||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
set(HOST_OS "linux")
|
||||
endif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES ".*(SunOS|Solaris).*")
|
||||
set(HOST_OS "solaris")
|
||||
set(SOLARIS 1)
|
||||
endif(${CMAKE_SYSTEM_NAME} MATCHES ".*(SunOS|Solaris).*")
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES ".*BSD.*")
|
||||
set(HOST_OS "BSD")
|
||||
set(BSD 1)
|
||||
endif(${CMAKE_SYSTEM_NAME} MATCHES ".*BSD.*")
|
||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
|
||||
set(HOST_OS "darwin")
|
||||
endif(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
|
||||
if(NOT HOST_OS)
|
||||
message(FATAL_ERROR
|
||||
"ZoneMinder was unable to deterimine the host OS. Please report this. Value of CMAKE_SYSTEM_NAME: ${CMAKE_SYSTEM_NAME}")
|
||||
endif(NOT HOST_OS)
|
||||
|
||||
# System checks
|
||||
check_include_file("libv4l1-videodev.h" HAVE_LIBV4L1_VIDEODEV_H)
|
||||
if(NOT HAVE_LIBV4L1_VIDEODEV_H)
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
# use pkg-config to get the directories and then use these values
|
||||
# in the FIND_PATH() and FIND_LIBRARY() calls
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(PC_POLKIT polkit-gobject-1)
|
||||
pkg_search_module(PC_POLKIT polkit-gobject-1 polkit)
|
||||
#pkg_check_modules(PC_POLKIT_AGENT polkit-agent-1)
|
||||
set(POLKIT_DEFINITIONS ${PC_POLKIT_CFLAGS_OTHER})
|
||||
endif (NOT WIN32)
|
||||
|
@ -31,8 +31,8 @@
|
|||
HINTS ${PC_POLKIT_INCLUDE_DIRS}
|
||||
)
|
||||
find_path( POLKIT_INCLUDE_DIR
|
||||
NAMES polkit/polkit.h
|
||||
PATH_SUFFIXES polkit-1
|
||||
NAMES polkit/polkit.h libpolkit/libpolkit.h
|
||||
PATH_SUFFIXES polkit-1 polkit
|
||||
HINTS ${PC_POLKIT_INCLUDE_DIRS}
|
||||
)
|
||||
#find_path( POLKIT_AGENT_INCLUDE_DIR
|
||||
|
@ -43,7 +43,7 @@
|
|||
#set(POLKIT_INCLUDE_DIRS ${GLIB2_INCLUDE_DIR} ${_POLKIT_INCLUDE_DIR})
|
||||
#set(POLKIT_AGENT_INCLUDE_DIRS ${GLIB2_INCLUDE_DIR} ${_POLKIT_AGENT_INCLUDE_DIR})
|
||||
find_library( POLKIT_LIBRARIES
|
||||
NAMES polkit-gobject-1
|
||||
NAMES polkit-gobject-1 polkit
|
||||
HINTS ${PC_POLKIT_LIBDIR}
|
||||
)
|
||||
#find_library( POLKIT_AGENT_LIBRARY
|
||||
|
|
Loading…
Reference in New Issue