-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
90 changed files
with
1,239 additions
and
48,048 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
Author: | ||
BYVoid <[email protected]> | ||
|
||
Contributors: | ||
Peng Huang <[email protected]> | ||
Kefu Chai <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
# | ||
# Open Chinese Convert | ||
# | ||
# Copyright 2010 BYVoid <[email protected]> | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
######## Project settings | ||
cmake_minimum_required(VERSION 2.8) | ||
set (PACKAGE_NAME opencc) | ||
project (${PACKAGE_NAME} C) | ||
enable_testing() | ||
|
||
######## Package information | ||
set (PACKAGE_URL http://code.google.com/p/open-chinese-convert) | ||
set (PACKAGE_BUGREPORT http://code.google.com/p/open-chinese-convert/issues/entry) | ||
set (OPENCC_VERSION_MAJOR 0) | ||
set (OPENCC_VERSION_MINOR 2) | ||
set (OPENCC_VERSION_REVISION 0) | ||
|
||
if (CMAKE_BUILD_TYPE MATCHES Debug) | ||
set (version_suffix .Debug) | ||
endif (CMAKE_BUILD_TYPE MATCHES Debug) | ||
|
||
set ( | ||
OPENCC_VERSION | ||
${OPENCC_VERSION_MAJOR}.${OPENCC_VERSION_MINOR}.${OPENCC_VERSION_REVISION}${version_suffix} | ||
) | ||
|
||
######## Validation | ||
|
||
if (ENABLE_GETTEXT) | ||
find_package(Gettext REQUIRED) | ||
endif (ENABLE_GETTEXT) | ||
|
||
include (TestBigEndian) | ||
TEST_BIG_ENDIAN(BIGENDIAN) | ||
if (BIGENDIAN) | ||
set (BYTEORDER BIG_ENDIAN) | ||
else (BIGENDIAN) | ||
set (BYTEORDER LITTLE_ENDIAN) | ||
endif (BIGENDIAN) | ||
|
||
######## Directory | ||
|
||
set (DIR_PREFIX ${CMAKE_INSTALL_PREFIX}) | ||
set (DIR_LIBRARY ${CMAKE_SHARED_LIBRARY_PREFIX}) | ||
set (DIR_LIBRARY_STATIC ${CMAKE_STATIC_LIBRARY_PREFIX}) | ||
set (DIR_INCLUDE include) | ||
set (DIR_SHARE share) | ||
set (DIR_BIN bin) | ||
set (PKGDATADIR ${DIR_PREFIX}/${DIR_SHARE}/opencc) | ||
set (LOCALEDIR ${DIR_PREFIX}/${DIR_SHARE}/locale) | ||
|
||
######## Configuration | ||
|
||
configure_file( | ||
opencc.pc.in | ||
opencc.pc | ||
@ONLY | ||
) | ||
|
||
install( | ||
FILES | ||
${CMAKE_BINARY_DIR}/opencc.pc | ||
DESTINATION | ||
${DIR_LIBRARY}/pkgconfig | ||
) | ||
|
||
######## Subdirectories | ||
|
||
add_subdirectory(src) | ||
add_subdirectory(doc) | ||
add_subdirectory(data) | ||
|
||
if (GETTEXT_FOUND AND ENABLE_GETTEXT) | ||
add_subdirectory(po) | ||
endif (GETTEXT_FOUND AND ENABLE_GETTEXT) | ||
|
||
add_subdirectory(test) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.