new style Makefile
This commit is contained in:
parent
50e94c9094
commit
73b10e7207
@ -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 $<TARGET_FILE:utf8proc>)
|
||||
|
||||
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 $<TARGET_FILE_NAME:utf8proc> )
|
||||
|
||||
|
Reference in New Issue
Block a user