Mercurial > vec
annotate CMakeLists.txt @ 13:53197dbf4e8e
vec.h: initial refactor for runtime SSE and stuff
author | Paper <paper@tflc.us> |
---|---|
date | Tue, 19 Nov 2024 15:54:38 -0500 |
parents | 6e0eb3aa12ab |
children | e05c257c6a23 |
rev | line source |
---|---|
8
6e0eb3aa12ab
build: add files to build vec as an external library
Paper <paper@tflc.us>
parents:
diff
changeset
|
1 cmake_minimum_required(VERSION 3.5) |
6e0eb3aa12ab
build: add files to build vec as an external library
Paper <paper@tflc.us>
parents:
diff
changeset
|
2 |
6e0eb3aa12ab
build: add files to build vec as an external library
Paper <paper@tflc.us>
parents:
diff
changeset
|
3 project(vec VERSION 1.0.0 DESCRIPTION "a tiny C99 SIMD vector library") |
6e0eb3aa12ab
build: add files to build vec as an external library
Paper <paper@tflc.us>
parents:
diff
changeset
|
4 |
6e0eb3aa12ab
build: add files to build vec as an external library
Paper <paper@tflc.us>
parents:
diff
changeset
|
5 add_library(vec SHARED src/vec.c) |
6e0eb3aa12ab
build: add files to build vec as an external library
Paper <paper@tflc.us>
parents:
diff
changeset
|
6 |
6e0eb3aa12ab
build: add files to build vec as an external library
Paper <paper@tflc.us>
parents:
diff
changeset
|
7 set_target_properties(vec PROPERTIES PUBLIC_HEADER include/vec/vec.h) |
6e0eb3aa12ab
build: add files to build vec as an external library
Paper <paper@tflc.us>
parents:
diff
changeset
|
8 |
6e0eb3aa12ab
build: add files to build vec as an external library
Paper <paper@tflc.us>
parents:
diff
changeset
|
9 target_include_directories(vec PRIVATE include) |
6e0eb3aa12ab
build: add files to build vec as an external library
Paper <paper@tflc.us>
parents:
diff
changeset
|
10 |
6e0eb3aa12ab
build: add files to build vec as an external library
Paper <paper@tflc.us>
parents:
diff
changeset
|
11 # Installing |
6e0eb3aa12ab
build: add files to build vec as an external library
Paper <paper@tflc.us>
parents:
diff
changeset
|
12 |
6e0eb3aa12ab
build: add files to build vec as an external library
Paper <paper@tflc.us>
parents:
diff
changeset
|
13 include(GNUInstallDirs) |
6e0eb3aa12ab
build: add files to build vec as an external library
Paper <paper@tflc.us>
parents:
diff
changeset
|
14 |
6e0eb3aa12ab
build: add files to build vec as an external library
Paper <paper@tflc.us>
parents:
diff
changeset
|
15 install(TARGETS vec |
6e0eb3aa12ab
build: add files to build vec as an external library
Paper <paper@tflc.us>
parents:
diff
changeset
|
16 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} |
6e0eb3aa12ab
build: add files to build vec as an external library
Paper <paper@tflc.us>
parents:
diff
changeset
|
17 PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) |
6e0eb3aa12ab
build: add files to build vec as an external library
Paper <paper@tflc.us>
parents:
diff
changeset
|
18 |
6e0eb3aa12ab
build: add files to build vec as an external library
Paper <paper@tflc.us>
parents:
diff
changeset
|
19 # pkg-config |
6e0eb3aa12ab
build: add files to build vec as an external library
Paper <paper@tflc.us>
parents:
diff
changeset
|
20 configure_file(vec.pc.in vec.pc @ONLY) |
6e0eb3aa12ab
build: add files to build vec as an external library
Paper <paper@tflc.us>
parents:
diff
changeset
|
21 install(FILES ${CMAKE_BINARY_DIR}/vec.pc DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig) |