From: Mike McCormack Date: Thu, 21 Apr 2011 07:17:12 +0000 (+0900) Subject: Build using CMake X-Git-Tag: submit/master/20120920.151126~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=41d3d6fa364af8ce66c01fb89a5057278384c1a1;p=framework%2Fuifw%2Fharfbuzz.git Build using CMake --- diff --git a/.gitignore b/.gitignore index d413b0b..c455f22 100755 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,8 @@ debian/libharfbuzz-dev/ debian/libharfbuzz/ config.guess config.sub +CMakeCache.txt +CMakeFiles/ +cmake_install.cmake +install_manifest.txt +libharfbuzz.so diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..69c8ac1 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,19 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 2.6) +PROJECT(harfbuzz C) + +INCLUDE(FindPkgConfig) +pkg_check_modules(pkgs REQUIRED libxml-2.0) + +SET(SRCS + src/harfbuzz-dump.c + src/harfbuzz-shaper-all.c + src/harfbuzz-external.c + src/harfbuzz.c) + +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) + +ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS}) + +INSTALL(TARGETS ${PROJECT_NAME} DESTINATION lib) +INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/include DESTINATION include/${PROJECT_NAME}) +INSTALL(FILES ${CMAKE_SOURCE_DIR}/${PROJECT_NAME}.pc DESTINATION lib/pkgconfig) diff --git a/Makefile b/Makefile deleted file mode 100755 index e14c665..0000000 --- a/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -## Process this file with automake to produce Makefile.in -CC=gcc -INCLUDE=-I ./include -I /usr/include/freetype2/ -I /usr/include/freetype2/freetype/ -I /usr/include/freetype2/freetype/config/ - -OPTIONS=-g -fPIC - -MAINSOURCES = \ - src/harfbuzz-dump.c \ - src/harfbuzz-shaper-all.c \ - src/harfbuzz-external.c \ - src/harfbuzz.c - - OBJECTS = \ - harfbuzz-dump.o \ - harfbuzz-shaper-all.o \ - harfbuzz-external.o \ - harfbuzz.o - - -TARGET=libharfbuzz.so -library : - cc -Wall $(INCLUDE) $(OPTIONS) -c $(MAINSOURCES) - -all: library - cc -shared -Wl,-soname,$(TARGET) -o $(TARGET) $(OBJECTS) -install: - mkdir -p debian/tmp/usr/lib - mv $(TARGET) debian/tmp/usr/lib - mkdir -p debian/tmp/usr/include/harfbuzz - cp include/* debian/tmp/usr/include/harfbuzz - mkdir -p debian/tmp/usr/lib/pkgconfig/ - cp harfbuzz.pc debian/tmp/usr/lib/pkgconfig/ - -clean: - rm -rf *.o *.so - rm -rf debian/libharfbuzz-dev/ - rm -rf debian/libharfbuzz/ - rm -rf debian/tmp/ diff --git a/debian/rules b/debian/rules index 3b72f05..eee5bed 100755 --- a/debian/rules +++ b/debian/rules @@ -31,7 +31,7 @@ configure: configure-stamp configure-stamp: dh_testdir # Add here commands to configure the package. - PREFIX=$(PREFIX) make -f Makefile all + CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" cmake . -DCMAKE_INSTALL_PREFIX=${PREFIX} build: build-stamp @@ -56,12 +56,6 @@ clean: # Add here commands to clean up after the build process. -$(MAKE) clean -ifneq "$(wildcard /usr/share/misc/config.sub)" "" - cp -f /usr/share/misc/config.sub config.sub -endif -ifneq "$(wildcard /usr/share/misc/config.guess)" "" - cp -f /usr/share/misc/config.guess config.guess -endif for f in `find $(CURDIR)/debian/ -name "*.in"`; do \ rm -f $${f%.in}; \