summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2013-11-10 03:29:12 +0100
committerFlorent Le Coz <louiz@louiz.org>2013-11-10 03:29:12 +0100
commit5cb81cace08b016f50708bb8ef718e07865b435a (patch)
treed2a18daef28d4de46f8af95ba9ed12daec1275dc
parentef014f7ddf8fd603a4238f5ed4878d7038ce162d (diff)
downloadbiboumi-5cb81cace08b016f50708bb8ef718e07865b435a.tar.gz
biboumi-5cb81cace08b016f50708bb8ef718e07865b435a.tar.bz2
biboumi-5cb81cace08b016f50708bb8ef718e07865b435a.tar.xz
biboumi-5cb81cace08b016f50708bb8ef718e07865b435a.zip
And actually use the values found by cmake
-rw-r--r--CMakeLists.txt2
-rw-r--r--config.h.cmake1
-rw-r--r--src/utils/encoding.cpp2
3 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f651723..b0d2801 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -80,3 +80,5 @@ target_link_libraries(test
irc
bridge
utils)
+
+CONFIGURE_FILE(config.h.cmake config.h @ONLY)
diff --git a/config.h.cmake b/config.h.cmake
new file mode 100644
index 0000000..5f0a3cb
--- /dev/null
+++ b/config.h.cmake
@@ -0,0 +1 @@
+#cmakedefine ICONV_SECOND_ARGUMENT_IS_CONST
diff --git a/src/utils/encoding.cpp b/src/utils/encoding.cpp
index 2a6aecb..2d95132 100644
--- a/src/utils/encoding.cpp
+++ b/src/utils/encoding.cpp
@@ -7,6 +7,8 @@
#include <string.h>
#include <iconv.h>
+#include "config.h"
+
/**
* The UTF-8-encoded character used as a place holder when a character conversion fails.
* This is U+FFFD � "replacement character"