-# (BUG!!!) as PKG_CONFIG_PATH does not work [should be an env variable]
-# ---------------------------------------------------------------------
-set(CMAKE_INSTALL_PREFIX $ENV{HOME}/opt)
-set(CMAKE_PREFIX_PATH ${CMAKE_INSTALL_PREFIX}/lib64/pkgconfig ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig)
-set(LD_LIBRARY_PATH ${CMAKE_INSTALL_PREFIX}/lib64 ${CMAKE_INSTALL_PREFIX}/lib)
+# Customize link option
+# -----------------------------
+list (APPEND link_libraries -pthread)
+
+# Compilation options definition
+# Use CMake generator expressions to specify only for a specific language
+# Values are prefilled with default options that is currently used.
+# Either separate options with ";", or each options must be quoted separately
+# DO NOT PUT ALL OPTION QUOTED AT ONCE , COMPILATION COULD FAILED !
+# ----------------------------------------------------------------------------
+set(COMPILE_OPTIONS
+ -Wall
+ -Wextra
+ -Wconversion
+ -Wno-unused-parameter
+ -Wno-sign-compare
+ -Wno-sign-conversion
+ -Werror=maybe-uninitialized
+ -Werror=implicit-function-declaration
+ -ffunction-sections
+ -fdata-sections
+ -fPIC
+ -DPB_FIELD_16BIT
+ CACHE STRING "Compilation flags")
+#set(C_COMPILE_OPTIONS "" CACHE STRING "Compilation flags for C language.")
+set(CXX_COMPILE_OPTIONS -pthread CACHE STRING "Compilation flags for C++ language.")
+#set(PROFILING_COMPILE_OPTIONS
+# -g
+# -O0
+# -pg
+# -Wp,-U_FORTIFY_SOURCE
+# CACHE STRING "Compilation flags for PROFILING build type.")
+#set(DEBUG_COMPILE_OPTIONS
+# -Og
+# -g
+# -ggdb
+# -D_FORTIFY_SOURCE=2
+# CACHE STRING "Compilation flags for DEBUG build type.")
+#set(COVERAGE_COMPILE_OPTIONS
+# -g
+# -O2
+# --coverage
+# CACHE STRING "Compilation flags for COVERAGE build type.")
+#set(RELEASE_COMPILE_OPTIONS
+# -O2
+# -D_FORTIFY_SOURCE=2
+# CACHE STRING "Compilation flags for RELEASE build type.")
+
+add_definitions(-DAFB_BINDING_VERSION=2)