Skip to content

Commit

Permalink
refactor(cmake/FindRimeData.cmake): deprecate brise
Browse files Browse the repository at this point in the history
  • Loading branch information
lotem committed Apr 7, 2018
1 parent b1f9a55 commit ca57cb6
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 27 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ if(Rime_FOUND)
endif(Rime_FOUND)

if(NOT DEFINED RIME_DATA_DIR)
find_package(Brise REQUIRED)
set(RIME_DATA_DIR ${BRISE_DIR})
find_package(RimeData REQUIRED)
endif(NOT DEFINED RIME_DATA_DIR)
message(STATUS "Precompiler macro RIME_DATA_DIR is set to \"${RIME_DATA_DIR}\"")
add_definitions(-DRIME_DATA_DIR="${RIME_DATA_DIR}")
Expand Down
25 changes: 0 additions & 25 deletions cmake/FindBrise.cmake

This file was deleted.

23 changes: 23 additions & 0 deletions cmake/FindRimeData.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Author: Marguerite Su <[email protected]>
# License: GPL
# Description: find Rime schema collection package.
# RIME_DATA_FOUND - System has rime-data package
# RIME_DATA_DIR - rime-data absolute path

set(RIME_DATA_FIND_DIR "${CMAKE_INSTALL_PREFIX}/share/rime-data"
"${CMAKE_INSTALL_PREFIX}/share/rime/data"
"/usr/share/rime-data"
"/usr/share/rime/data")

set(RIME_DATA_FOUND FALSE)

foreach(_RIME_DATA_DIR ${RIME_DATA_FIND_DIR})
if (IS_DIRECTORY ${_RIME_DATA_DIR})
set(RIME_DATA_FOUND True)
set(RIME_DATA_DIR ${_RIME_DATA_DIR})
endif (IS_DIRECTORY ${_RIME_DATA_DIR})
endforeach(_RIME_DATA_DIR)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(RimeData DEFAULT_MSG RIME_DATA_DIR)
mark_as_advanced(RIME_DATA_DIR)

0 comments on commit ca57cb6

Please sign in to comment.