diff options
author | pommicket <pommicket@gmail.com> | 2025-09-15 20:28:11 -0400 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2025-09-15 20:28:11 -0400 |
commit | 06e068ea14220903bd95fea94d44fe3f1a918481 (patch) | |
tree | 278ce9ab78bda672454dc1de63389337f79b67bd /CMakeLists.txt | |
parent | aafaca51cfbdc66a6ff9af52121470f59b9559ac (diff) |
Installable library
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 0972a9b..69291e6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,12 +8,16 @@ else() endif() -add_library(pom-static STATIC pom.c) -add_library(pom SHARED pom.c) +add_library(pom STATIC pom.c) +add_library(pom-shared SHARED pom.c) +set_target_properties(pom-shared PROPERTIES OUTPUT_NAME pom) add_executable(tests tests/errors.c tests/location.c tests/parsing.c tests/interpretation.c tests/main.c) target_include_directories(tests PRIVATE .) -target_link_libraries(tests pom-static) +target_link_libraries(tests pom) add_executable(read_conf examples/read_conf.c) target_include_directories(read_conf PRIVATE .) -target_link_libraries(read_conf pom-static) +target_link_libraries(read_conf pom) +install(TARGETS pom pom-shared DESTINATION lib) +install(FILES pom.pc DESTINATION lib) +install(FILES pom.h DESTINATION include) |