From 73b10e72070ed566b16a56ff8f71dd44c142ff83 Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Sun, 31 Jul 2016 11:35:28 -0500 Subject: [PATCH] new style Makefile --- utf8proc/CMakeLists.txt | 45 ++++++----------------------------------- 1 file changed, 6 insertions(+), 39 deletions(-) diff --git a/utf8proc/CMakeLists.txt b/utf8proc/CMakeLists.txt index 3b45c6001..dcbcc2427 100644 --- a/utf8proc/CMakeLists.txt +++ b/utf8proc/CMakeLists.txt @@ -1,5 +1,10 @@ cmake_minimum_required (VERSION 2.8) +set ( UTF8PROC_SOURCES +utf8proc.c ) + +add_component(utf8proc ${UTF8PROC_SOURCES} ) + if(POLICY CMP0042) cmake_policy(SET CMP0042 NEW) endif(POLICY CMP0042) @@ -26,47 +31,9 @@ endif () SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${my_cxx_flags}" ) SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${my_cxx_flags}" ) -if (YAP_SINGLE_FILE) - add_library (utf8proc OBJECT - utf8proc.c - utf8proc.h - ) -else(YAP_SINGLE_FILE) -add_library (utf8proc SHARED - utf8proc.c - utf8proc.h -) - - -# copy DLL to yap main bin dir so that we can use yap -# during compilation -if (WIN32) - -ADD_CUSTOM_target( setupUTF8) - - SET (UTFPATH $) - -add_custom_command(TARGET setupUTF8 POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy ${UTFPATH} ${CMAKE_BINARY_DIR} -) - -ADD_DEPENDENCIES(libYap setupUTF8) - -endif(WIN32) - -install(TARGETS utf8proc - LIBRARY DESTINATION ${libdir} - ARCHIVE DESTINATION ${libdir}) - -endif(YAP_SINGLE_FILE) - -set_target_properties (utf8proc PROPERTIES - POSITION_INDEPENDENT_CODE ON - VERSION "${SO_MAJOR}.${SO_MINOR}.${SO_PATCH}" - SOVERSION ${SO_MAJOR} -) set( CMAKE_REQUIRED_INCLUDES . ${CMAKE_REQUIRED_INCLUDES} ) set ( YAP_YAPUTF8LIB $ ) +