[Pkg-privacy-commits] [irssi-plugin-otr] 68/267: Some build changes.
Ximin Luo
infinity0 at moszumanska.debian.org
Sat Aug 22 12:41:29 UTC 2015
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch debian
in repository irssi-plugin-otr.
commit d1d94626bab305d9e9735bd27fe4153ba2021fec
Author: Uli Meis <a.sporto+bee at gmail.com>
Date: Mon Feb 16 02:49:59 2009 +0100
Some build changes.
---
CMakeLists.txt | 12 ++++++++----
irssi/CMakeLists.txt | 17 +++++++++--------
weechat/.gitignore | 1 +
weechat/CMakeLists.txt | 16 ++++++++++------
xchat/CMakeLists.txt | 12 +++++++-----
5 files changed, 35 insertions(+), 23 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e07a610..e0146ff 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -150,6 +150,9 @@ ADD_CUSTOM_COMMAND(OUTPUT
${PROJECT_SOURCE_DIR}/README
)
+
+add_custom_target(otrformats DEPENDS otr-formats.c)
+
# Now that took some time to figure out...
IF(APPLE)
@@ -163,7 +166,8 @@ ENDFOREACH(X ${LIBGCRYPT_LDFLAGS} ${GLIB_LDFLAGS} ${APPLE_LDFLAGS})
FIND_PATH(IRSSI_INCLUDE_DIR NAMES irssi/src/core/module.h)
MARK_AS_ADVANCED(IRSSI_INCLUDE_DIR)
-FIND_PATH(WEECHAT_INCLUDE_DIR NAMES weechat-plugin.h)
+FIND_PATH(WEECHAT_INCLUDE_DIR NAMES weechat/weechat-plugin.h
+ PATHS ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR})
MARK_AS_ADVANCED(WEECHAT_INCLUDE_DIR)
FIND_PATH(XCHAT_INCLUDE_DIR NAMES xchat/xchat-plugin.h)
@@ -192,13 +196,13 @@ OPTION(WANT_XCHAT "build xchat plugin" ${W_XCHAT})
OPTION(WANT_WEECHAT "build weechat plugin" ${W_WEECHAT})
IF(WANT_IRSSI)
- INCLUDE(irssi/CMakeLists.txt)
+ add_subdirectory(irssi)
ENDIF(WANT_IRSSI)
IF(WANT_XCHAT)
- INCLUDE(xchat/CMakeLists.txt)
+ add_subdirectory(xchat)
ENDIF(WANT_XCHAT)
IF(WANT_WEECHAT)
- INCLUDE(weechat/CMakeLists.txt)
+ add_subdirectory(weechat)
ENDIF(WANT_WEECHAT)
# cscope
diff --git a/irssi/CMakeLists.txt b/irssi/CMakeLists.txt
index 4459e35..b630df7 100644
--- a/irssi/CMakeLists.txt
+++ b/irssi/CMakeLists.txt
@@ -1,5 +1,3 @@
-# irssi public headers
-
IF(NOT IRSSI_INCLUDE_DIR)
MESSAGE(FATAL_ERROR "*** no irssi found. If you don't want this plugin set the
appropriate option to OFF, use for instance 'ccmake .' ***")
@@ -7,18 +5,17 @@ ENDIF(NOT IRSSI_INCLUDE_DIR)
MESSAGE(STATUS "*** building for irssi ***")
-SET(IRCOTR_INCLUDE_DIRS
- ${IRCOTR_INCLUDE_DIRS}
+SET(IRSSIOTR_INCLUDE_DIRS
${IRSSI_INCLUDE_DIR}/irssi
${IRSSI_INCLUDE_DIR}/irssi/src
${IRSSI_INCLUDE_DIR}/irssi/src/core
${PROJECT_BINARY_DIR}/irssi-headers
${PROJECT_SOURCE_DIR}/irssi-headers
- irssi)
+ ${PROJECT_SOURCE_DIR}/irssi)
-INCLUDE_DIRECTORIES(${IRCOTR_INCLUDE_DIRS})
+INCLUDE_DIRECTORIES(${IRSSIOTR_INCLUDE_DIRS})
-SET(CMAKE_REQUIRED_INCLUDES ${IRCOTR_INCLUDE_DIRS})
+SET(CMAKE_REQUIRED_INCLUDES ${IRCOTR_INCLUDE_DIRS} ${IRSSIOTR_INCLUDE_DIRS})
# irssi statusbar header
@@ -43,12 +40,16 @@ IF (NOT HAVE_IRSSISBAR_H)
SET(HAVE_IRSSISBAR_H 1 CACHE INTERNAL "Having irssi headers" FORCE)
ENDIF (NOT HAVE_IRSSISBAR_H)
-ADD_LIBRARY(irssiotr SHARED irssi/irssi_otr.c otr_util.c otr_ops.c otr_key.c io_util.c ${CMAKE_BINARY_DIR}/otr-formats.c)
+ADD_LIBRARY(irssiotr SHARED irssi_otr.c ../otr_util.c ../otr_ops.c ../otr_key.c ../io_util.c ${CMAKE_BINARY_DIR}/otr-formats.c)
TARGET_LINK_LIBRARIES(irssiotr ${GLIB_LIBRARIES} ${LIBOTR_LIBRARIES})
SET_TARGET_PROPERTIES(irssiotr PROPERTIES
COMPILE_FLAGS -DTARGET_IRSSI
OUTPUT_NAME "otr"
LINK_FLAGS "${MAIN_LDFLAGS}")
+
+add_dependencies(irssiotr otrformats)
+set_source_files_properties(${CMAKE_BINARY_DIR}/otr-formats.c PROPERTIES GENERATED TRUE)
+
IF(APPLE)
SET_TARGET_PROPERTIES(irssiotr PROPERTIES SUFFIX ".so")
ENDIF(APPLE)
diff --git a/weechat/.gitignore b/weechat/.gitignore
new file mode 100644
index 0000000..73fe751
--- /dev/null
+++ b/weechat/.gitignore
@@ -0,0 +1 @@
+weechat-plugin.h
diff --git a/weechat/CMakeLists.txt b/weechat/CMakeLists.txt
index 13d8680..7369388 100644
--- a/weechat/CMakeLists.txt
+++ b/weechat/CMakeLists.txt
@@ -4,19 +4,23 @@ IF(NOT WEECHAT_INCLUDE_DIR)
ENDIF(NOT WEECHAT_INCLUDE_DIR)
MESSAGE(STATUS "*** building for weechat ***")
-SET(IRCOTR_INCLUDE_DIRS
- ${IRCOTR_INCLUDE_DIRS}
- ${WEECHAT_INCLUDE_DIR}
- weechat)
-INCLUDE_DIRECTORIES(${IRCOTR_INCLUDE_DIRS})
+SET(WEECHATOTR_INCLUDE_DIRS
+ ${WEECHAT_INCLUDE_DIR}/weechat
+ ${PROJECT_SOURCE_DIR}/weechat)
-ADD_LIBRARY(weechatotr SHARED weechat/weechat_otr.c otr_util.c otr_ops.c otr_key.c io_util.c io_set.c ${PROJECT_BINARY_DIR}/xchat-formats.c)
+INCLUDE_DIRECTORIES(${WEECHATOTR_INCLUDE_DIRS})
+
+ADD_LIBRARY(weechatotr SHARED weechat_otr.c ../otr_util.c ../otr_ops.c ../otr_key.c ../io_util.c ../io_set.c ${PROJECT_BINARY_DIR}/xchat-formats.c)
TARGET_LINK_LIBRARIES(weechatotr ${GLIB_LIBRARIES} ${LIBOTR_LIBRARIES})
SET_TARGET_PROPERTIES(weechatotr PROPERTIES
COMPILE_FLAGS -DTARGET_WEECHAT
OUTPUT_NAME "weechatotr"
LINK_FLAGS "${MAIN_LDFLAGS}")
+
+add_dependencies(weechatotr otrformats)
+set_source_files_properties(${CMAKE_BINARY_DIR}/xchat-formats.c PROPERTIES GENERATED TRUE)
+
IF(APPLE)
SET_TARGET_PROPERTIES(weechatotr PROPERTIES SUFFIX ".so")
ENDIF(APPLE)
diff --git a/xchat/CMakeLists.txt b/xchat/CMakeLists.txt
index 71e688b..e235d7f 100644
--- a/xchat/CMakeLists.txt
+++ b/xchat/CMakeLists.txt
@@ -5,20 +5,22 @@ ENDIF(NOT XCHAT_INCLUDE_DIR)
MESSAGE(STATUS "*** building for xchat ***")
-SET(IRCOTR_INCLUDE_DIRS
- ${IRCOTR_INCLUDE_DIRS}
+SET(XCHATOTR_INCLUDE_DIRS
${XCHAT_INCLUDE_DIR}/xchat
- xchat)
+ ${PROJECT_SOURCE_DIR}/xchat)
-INCLUDE_DIRECTORIES(${IRCOTR_INCLUDE_DIRS})
+INCLUDE_DIRECTORIES(${XCHATOTR_INCLUDE_DIRS})
-ADD_LIBRARY(xchatotr SHARED xchat/xchat_otr.c otr_util.c otr_ops.c otr_key.c io_util.c io_set.c ${PROJECT_BINARY_DIR}/xchat-formats.c)
+ADD_LIBRARY(xchatotr SHARED xchat_otr.c ../otr_util.c ../otr_ops.c ../otr_key.c ../io_util.c ../io_set.c ${PROJECT_BINARY_DIR}/xchat-formats.c)
TARGET_LINK_LIBRARIES(xchatotr ${GLIB_LIBRARIES} ${LIBOTR_LIBRARIES})
SET_TARGET_PROPERTIES(xchatotr PROPERTIES
COMPILE_FLAGS -DTARGET_XCHAT
OUTPUT_NAME "xchatotr"
LINK_FLAGS "${MAIN_LDFLAGS}")
+add_dependencies(xchatotr otrformats)
+set_source_files_properties(${CMAKE_BINARY_DIR}/xchat-formats.c PROPERTIES GENERATED TRUE)
+
IF(APPLE)
SET_TARGET_PROPERTIES(xchatotr PROPERTIES SUFFIX ".so")
ENDIF(APPLE)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/irssi-plugin-otr.git
More information about the Pkg-privacy-commits
mailing list