Browse Source
move flags for MSVC rename lump.txt to lump.md, add data/*.txt to .gitignorepull/28/head
Tony Kelman
10 years ago
6 changed files with 47 additions and 4 deletions
@ -0,0 +1,22 @@ |
|||||
|
cmake_minimum_required (VERSION 2.8) |
||||
|
|
||||
|
include (utils.cmake) |
||||
|
|
||||
|
disallow_intree_builds() |
||||
|
|
||||
|
project (utf8proc C) |
||||
|
|
||||
|
add_definitions ( |
||||
|
-DUTF8PROC_EXPORTS |
||||
|
) |
||||
|
|
||||
|
if (NOT MSVC) |
||||
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -std=c99 -pedantic -Wall") |
||||
|
endif () |
||||
|
|
||||
|
add_library (utf8proc |
||||
|
utf8proc.c |
||||
|
utf8proc.h |
||||
|
) |
||||
|
|
||||
|
set_property (TARGET utf8proc PROPERTY POSITION_INDEPENDENT_CODE ON) |
@ -0,0 +1,20 @@ |
|||||
|
|
||||
|
function (disallow_intree_builds) |
||||
|
# Adapted from LLVM's toplevel CMakeLists.txt file |
||||
|
if( CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR AND NOT MSVC_IDE ) |
||||
|
message(FATAL_ERROR " |
||||
|
In-source builds are not allowed. CMake would overwrite the |
||||
|
makefiles distributed with utf8proc. Please create a directory |
||||
|
and run cmake from there. Building in a subdirectory is |
||||
|
fine, e.g.: |
||||
|
|
||||
|
mkdir build |
||||
|
cd build |
||||
|
cmake .. |
||||
|
|
||||
|
This process created the file `CMakeCache.txt' and the |
||||
|
directory `CMakeFiles'. Please delete them. |
||||
|
|
||||
|
") |
||||
|
endif() |
||||
|
endfunction() |
Loading…
Reference in new issue