add-cmake.diff
changeset 93 d59df8a9413d
parent 92 66f7e2aa040c
equal deleted inserted replaced
92:66f7e2aa040c 93:d59df8a9413d
     1 # HG changeset patch
     1 # HG changeset patch
     2 # Parent 386f3b8646a61ba6af61609ff67f2da2cc70251e
     2 # Parent 386f3b8646a61ba6af61609ff67f2da2cc70251e
     3 # Parent  04c97ffb0b5a75641bb2e6c1fc762f0383bc265e
     3 # Parent  926a4c065b3a767aa58b37a952327954e3bad98a
     4 Add possibility to build with CMake
     4 Add possibility to build with CMake
     5 
     5 
     6 diff --git a/.hgignore b/.hgignore
     6 diff --git a/.hgignore b/.hgignore
     7 --- a/.hgignore
     7 --- a/.hgignore
     8 +++ b/.hgignore
     8 +++ b/.hgignore
    14 +mcabber/build
    14 +mcabber/build
    15 diff --git a/mcabber/CMakeLists.txt b/mcabber/CMakeLists.txt
    15 diff --git a/mcabber/CMakeLists.txt b/mcabber/CMakeLists.txt
    16 new file mode 100644
    16 new file mode 100644
    17 --- /dev/null
    17 --- /dev/null
    18 +++ b/mcabber/CMakeLists.txt
    18 +++ b/mcabber/CMakeLists.txt
    19 @@ -0,0 +1,308 @@
    19 @@ -0,0 +1,309 @@
    20 +## Copyright 2010-2012 Myhailo Danylenko
    20 +## Copyright 2010-2012 Myhailo Danylenko
    21 +# This file is part of mcabber.
    21 +# This file is part of mcabber.
    22 +#
    22 +#
    23 +# mcabber is free software: you can redistribute it and/or modify
    23 +# mcabber is free software: you can redistribute it and/or modify
    24 +# it under the terms of the GNU General Public License as published by
    24 +# it under the terms of the GNU General Public License as published by
   116 +	else ()
   116 +	else ()
   117 +		find_package ( Curses )
   117 +		find_package ( Curses )
   118 +		# XXX just fail?
   118 +		# XXX just fail?
   119 +	endif ()
   119 +	endif ()
   120 +endif ()
   120 +endif ()
   121 +set ( CMAKE_REQUIRED_INCLUDES  ${CURSES_INCLUDE_DIRS}               )
   121 +set ( CMAKE_REQUIRED_INCLUDES    ${CURSES_INCLUDE_DIRS} )
   122 +set ( CMAKE_REQUIRED_LIBRARIES ${CURSES_LIBRARIES}                  )
   122 +set ( CMAKE_REQUIRED_LIBRARIES   ${CURSES_LIBRARIES}    )
   123 +set ( CMAKE_REQUIRED_FLAGS     "${CURSES_LDFLAGS} ${CURSES_CFLAGS}" )
   123 +set ( CMAKE_REQUIRED_DEFINITIONS ${CURSES_CFLAGS_OTHER} )
       
   124 +set ( CMAKE_REQUIRED_FLAGS       ${CURSES_LDFLAGS}      )
   124 +check_symbol_exists ( ESCDELAY "curses.h" HAVE_ESCDELAY )
   125 +check_symbol_exists ( ESCDELAY "curses.h" HAVE_ESCDELAY )
   125 +
   126 +
   126 +# Gpgme
   127 +# Gpgme
   127 +if ( WANT_GPGME )
   128 +if ( WANT_GPGME )
   128 +	find_program ( GPGME_CONFIG_EXECUTABLE gpgme-config DOC "Path to gpgme-config executable" )
   129 +	find_program ( GPGME_CONFIG_EXECUTABLE gpgme-config DOC "Path to gpgme-config executable" )