libds/CMakeLists.txt
Danila Fedorin 1a7ba8e393 Exit CMakeLists if the library has already been defined.
This is to prevent the re-use of this library in multiple projects.
2017-03-18 17:30:51 -07:00

19 lines
414 B
CMake

cmake_minimum_required(VERSION 2.7)
if(TARGET ds)
return()
endif(TARGET ds)
project(libds)
set_property(GLOBAL PROPERTY C_STANDARD 90)
ADD_COMPILE_OPTIONS(-pedantic -Wall)
add_library(ds STATIC src/libds.c src/vec.c src/ht.c src/ll.c src/sprs.c)
add_executable(libds src/main.c)
target_include_directories(ds PUBLIC include)
target_include_directories(libds PUBLIC include)
target_link_libraries(libds ds)