<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://fcitx-im.org/index.php?action=history&amp;feed=atom&amp;title=Compile_from_source%2Fen</id>
	<title>Compile from source/en - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://fcitx-im.org/index.php?action=history&amp;feed=atom&amp;title=Compile_from_source%2Fen"/>
	<link rel="alternate" type="text/html" href="https://fcitx-im.org/index.php?title=Compile_from_source/en&amp;action=history"/>
	<updated>2026-05-03T13:35:20Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://fcitx-im.org/index.php?title=Compile_from_source/en&amp;diff=1397&amp;oldid=prev</id>
		<title>FuzzyBot: Importing a new version from external source</title>
		<link rel="alternate" type="text/html" href="https://fcitx-im.org/index.php?title=Compile_from_source/en&amp;diff=1397&amp;oldid=prev"/>
		<updated>2016-02-02T23:17:35Z</updated>

		<summary type="html">&lt;p&gt;Importing a new version from external source&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;languages/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Grab the source ==&lt;br /&gt;
You can always get the stable code from [http://code.google.com/p/fcitx/downloads/], if you wish to use development version, you need to install &amp;#039;&amp;#039;&amp;#039;git&amp;#039;&amp;#039;&amp;#039; and take a look at http://code.google.com/p/fcitx/source/checkout and http://github.com/fcitx/.&lt;br /&gt;
&lt;br /&gt;
== General Dependency ==&lt;br /&gt;
In general, fcitx and its components largely use cmake as its build systems, and there are many cmake macros to help building a fcitx module.&lt;br /&gt;
&lt;br /&gt;
This section includes the most common dependencies among all Fcitx related packages (some packages might not depend on all of them).&lt;br /&gt;
* C compiler  (both [[wikipedia:GNU_Compiler_Collection|GCC]] and [[wikipedia:Clang|Clang]] are tested)&lt;br /&gt;
* C++ compiler (both [[wikipedia:G++|G++]] and [[wikipedia:Clang++|CLang++]])&lt;br /&gt;
* cmake&lt;br /&gt;
* intltool&lt;br /&gt;
* make&lt;br /&gt;
&lt;br /&gt;
=== Dependency of Fcitx ===&lt;br /&gt;
* gtk2 (gtk2 input method module)&lt;br /&gt;
* gtk3 (gtk2 input method module)&lt;br /&gt;
* qt4 (qt4 input method module)&lt;br /&gt;
* libxrender ([[Special:myLanguage/ClassicUI|Classic UI]])&lt;br /&gt;
* libxfixes (X compositor change detection for gnome and x clipboard access for fcitx-clipboard)&lt;br /&gt;
* cairo ([[Special:myLanguage/ClassicUI|Classic UI]])&lt;br /&gt;
* pango ([[Special:myLanguage/ClassicUI|Classic UI]])&lt;br /&gt;
* dbus (all im module, [[Special:myLanguage/Kimpanel|Kimpanel]])&lt;br /&gt;
* dbus-glib (gtk im module)&lt;br /&gt;
* [http://code.google.com/p/opencc opencc] (dynamic after 4.2.7, Better Simp-Trad Chinese Conversion for [[Special:myLanguage/Chttrans|Chttrans]])&lt;br /&gt;
* enchant (dynamic after 4.2.6, enchant word hint backend)&lt;br /&gt;
* presage (dynamic after 4.2.6, presage word hint backend)&lt;br /&gt;
* libxkbfile&lt;br /&gt;
* icu&lt;br /&gt;
* gobject-introspection&lt;br /&gt;
&lt;br /&gt;
If you want to see the specific package name on different distribution, please check [[Special:myLanguage/Fcitx Complie Dependencies|Fcitx Complie Dependencies]]&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;dynamic&amp;quot; dependency means the package is not required either at compile time or at runtime (although the corresponding option may be disabled by default if it is not found at compile time). The libraries will be loaded dynamically at runtime if found.&lt;br /&gt;
&lt;br /&gt;
== Compile Option ==&lt;br /&gt;
All compile option start with -D, following only include option name.&lt;br /&gt;
&lt;br /&gt;
=== CMake General option ===&lt;br /&gt;
* CMAKE_INSTALL_PREFIX (Directory to install)&lt;br /&gt;
* CMAKE_BUILD_TYPE (Debug, Release, RelWithDbgInfo)&lt;br /&gt;
&lt;br /&gt;
=== Fcitx option ===&lt;br /&gt;
&lt;br /&gt;
All ENABLE option is boolean value, can be set with On or Off. For default value, please check CMakeLists.txt.&lt;br /&gt;
&lt;br /&gt;
* ENABLE_GTK2_IM_MODULE&lt;br /&gt;
* ENABLE_GTK3_IM_MODULE&lt;br /&gt;
* ENABLE_QT_IM_MODULE&lt;br /&gt;
* ENABLE_CAIRO&lt;br /&gt;
* ENABLE_PANGO&lt;br /&gt;
* ENABLE_DBUS&lt;br /&gt;
* ENABLE_DEBUG&lt;br /&gt;
* ENABLE_TABLE&lt;br /&gt;
* ENABLE_OPENCC&lt;br /&gt;
* ENABLE_STATIC&lt;br /&gt;
* ENABLE_TEST&lt;br /&gt;
* ENABLE_SNOOPER&lt;br /&gt;
* ENABLE_GIR&lt;br /&gt;
* ENABLE_ENCHANT&lt;br /&gt;
* ENABLE_PRESAGE&lt;br /&gt;
* NO_SNOOPER_APPS (Comma separated [[wikipedia:Regex|regex]] string)&lt;br /&gt;
* LIB_INSTALL_DIR (By default is prefix/lib, useful when want to install under /usr/lib64 or other directory)&lt;br /&gt;
&lt;br /&gt;
== General command ==&lt;br /&gt;
&lt;br /&gt;
All cmake based Fcitx component can be compiled in following way.&lt;br /&gt;
&lt;br /&gt;
 cd /path/to/source&lt;br /&gt;
 mkdir build&lt;br /&gt;
 cd build&lt;br /&gt;
 cmake .. [CMake options]&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, build Fcitx with all im module, and install to /usr. If your distribution make use of /usr/lib64, you should add -DLIB_INSTALL_DIR=/usr/lib64(default &amp;quot;lib&amp;quot;).&lt;br /&gt;
 cd /path/to/source&lt;br /&gt;
 mkdir build&lt;br /&gt;
 cd build&lt;br /&gt;
 cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_GTK3_IM_MODULE=ON -DENABLE_QT_IM_MODULE=ON&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
For Other Fcitx component, you&amp;#039;d better use&lt;br /&gt;
&lt;br /&gt;
 cd /path/to/source&lt;br /&gt;
 mkdir build&lt;br /&gt;
 cd build&lt;br /&gt;
 cmake .. -DCMAKE_INSTALL_PREFIX=`fcitx4-config --prefix` -DLIB_INSTALL_DIR=`fcitx4-config --libdir`&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
== Use non standard path to install ==&lt;br /&gt;
It&amp;#039;s not recommend to use non standard path, but if you have special need, you need following environment variable to make things work.&lt;br /&gt;
&lt;br /&gt;
Say you install Fcitx at /opt/fcitx, and the library directory is /opt/fcitx/lib, then you need following environment variable.&lt;br /&gt;
&lt;br /&gt;
    export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/fcitx/lib/pkgconfig&lt;br /&gt;
    export PATH=$PATH:/opt/fcitx/bin&lt;br /&gt;
    export CMAKE_PREFIX_PATH=/opt/fcitx&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Special:myLanguage/Make a portable Fcitx|Make a portable Fcitx]]&lt;br /&gt;
* [http://www.cmake.org/Wiki/ CMake wiki]&lt;br /&gt;
&lt;br /&gt;
[[Category:Compile]]&lt;/div&gt;</summary>
		<author><name>FuzzyBot</name></author>
	</entry>
</feed>