Skip to content

Commit

Permalink
Update CMake build script
Browse files Browse the repository at this point in the history
Set sensible compiler flags and add target for ucdn-test.
  • Loading branch information
grigorig committed Sep 27, 2012
1 parent 21c2fc9 commit dbd2013
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
cmake_minimum_required(VERSION 2.6)
project(ucdn)
project(ucdn C)

ADD_DEFINITIONS(-O2 -Wall -std=c89)

add_library(ucdn_static STATIC ucdn.c ucdn.h)
add_library(ucdn_shared SHARED ucdn.c ucdn.h)
Expand All @@ -8,6 +10,9 @@ set_target_properties(ucdn_shared PROPERTIES OUTPUT_NAME ucdn)
set_target_properties(ucdn_shared PROPERTIES VERSION 1.0.0)
set_target_properties(ucdn_shared PROPERTIES SOVERSION 1)

add_executable(ucdn-test ucdn-test.c)
target_link_libraries(ucdn-test ucdn_static)

install(TARGETS ucdn_static ucdn_shared
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
Expand Down

0 comments on commit dbd2013

Please sign in to comment.