CMakeLists.txt 927 Bytes
Newer Older
1
cmake_minimum_required(VERSION 2.6)
2 3 4 5 6

project(fcitx-chewing)

set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})

Boyuan Yang's avatar
Boyuan Yang committed
7
FIND_PACKAGE(Chewing 0.5.0 REQUIRED)
8
FIND_PACKAGE(Fcitx 4.2.7 REQUIRED)
9

10
_fcitx_add_uninstall_target()
11 12 13 14 15 16 17

set(CMAKE_C_FLAGS "-Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -fvisibility=hidden ${CMAKE_C_FLAGS}")
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -fvisibility=hidden ${CMAKE_CXX_FLAGS}")
set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed ${CMAKE_SHARED_LINKER_FLAGS}")
set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--as-needed ${CMAKE_MODULE_LINKER_FLAGS}")

if(NOT DEFINED LIB_INSTALL_DIR)
18
  set(LIB_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib)
19 20 21
endif()

configure_file(
22 23 24
  "${CMAKE_CURRENT_SOURCE_DIR}/config.h.in"
  "${CMAKE_CURRENT_BINARY_DIR}/config.h"
  )
25 26 27

set(libdir ${LIB_INSTALL_DIR})

28
add_subdirectory(po)
29 30
add_subdirectory(src)
add_subdirectory(data)