Mercurial > vec
comparison CMakeLists.txt @ 8:6e0eb3aa12ab
build: add files to build vec as an external library
this is most definitely a double-edged sword, but you can
do it now if you *really* want to
author | Paper <paper@tflc.us> |
---|---|
date | Wed, 23 Oct 2024 20:44:30 -0400 |
parents | |
children | e05c257c6a23 |
comparison
equal
deleted
inserted
replaced
7:945d410803f8 | 8:6e0eb3aa12ab |
---|---|
1 cmake_minimum_required(VERSION 3.5) | |
2 | |
3 project(vec VERSION 1.0.0 DESCRIPTION "a tiny C99 SIMD vector library") | |
4 | |
5 add_library(vec SHARED src/vec.c) | |
6 | |
7 set_target_properties(vec PROPERTIES PUBLIC_HEADER include/vec/vec.h) | |
8 | |
9 target_include_directories(vec PRIVATE include) | |
10 | |
11 # Installing | |
12 | |
13 include(GNUInstallDirs) | |
14 | |
15 install(TARGETS vec | |
16 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} | |
17 PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) | |
18 | |
19 # pkg-config | |
20 configure_file(vec.pc.in vec.pc @ONLY) | |
21 install(FILES ${CMAKE_BINARY_DIR}/vec.pc DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig) |