libtreestore

diff CMakeLists.txt @ 3:48d75df3ef04

picking this up again, converted to cmake, and started a text format reader/writer
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 10 Nov 2016 16:19:44 +0200
parents
children bb873449cf59
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/CMakeLists.txt	Thu Nov 10 16:19:44 2016 +0200
     1.3 @@ -0,0 +1,36 @@
     1.4 +cmake_minimum_required(VERSION 3.0)
     1.5 +project(libtreestore)
     1.6 +
     1.7 +include(GNUInstallDirs)
     1.8 +
     1.9 +set(SO_MAJOR 0)
    1.10 +set(SO_MINOR 1)
    1.11 +
    1.12 +file(GLOB src "src/*.c")
    1.13 +file(GLOB hdr "src/*.h")
    1.14 +file(GLOB pubhdr "include/*.h")
    1.15 +
    1.16 +add_library(treestore SHARED ${src} ${hdr} ${pubhdr})
    1.17 +add_library(treestore-static STATIC ${src} ${hdr} ${pubhdr})
    1.18 +
    1.19 +set_target_properties(treestore PROPERTIES VERSION ${SO_MAJOR}.${SO_MINOR})
    1.20 +set_target_properties(treestore PROPERTIES SOVERSION ${SO_MAJOR})
    1.21 +
    1.22 +if(NOT WIN32)
    1.23 +	set_target_properties(treestore-static PROPERTIES OUTPUT_NAME treestore)
    1.24 +endif()
    1.25 +
    1.26 +target_include_directories(treestore PUBLIC include)
    1.27 +target_include_directories(treestore-static PUBLIC include)
    1.28 +
    1.29 +install(TARGETS treestore
    1.30 +	RUNTIME DESTINATION bin
    1.31 +	LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
    1.32 +	ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
    1.33 +
    1.34 +install(TARGETS treestore-static
    1.35 +	RUNTIME DESTINATION bin
    1.36 +	LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
    1.37 +	ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
    1.38 +
    1.39 +install(FILES ${pubhdr} DESTINATION include)