diff options
author | Matt Strapp <matt@mattstrapp.net> | 2024-05-13 13:20:11 -0500 |
---|---|---|
committer | Matt Strapp <matt@mattstrapp.net> | 2024-05-13 13:20:11 -0500 |
commit | 3e83931fd2e47bc09fb4e9bebfcdf9246c7219f8 (patch) | |
tree | 2fcba34d8b4d083484c5d12e71222e7fb4b1d368 /CMakeLists.txt | |
parent | Add CMake (diff) | |
download | locusts-3e83931fd2e47bc09fb4e9bebfcdf9246c7219f8.tar locusts-3e83931fd2e47bc09fb4e9bebfcdf9246c7219f8.tar.gz locusts-3e83931fd2e47bc09fb4e9bebfcdf9246c7219f8.tar.bz2 locusts-3e83931fd2e47bc09fb4e9bebfcdf9246c7219f8.tar.lz locusts-3e83931fd2e47bc09fb4e9bebfcdf9246c7219f8.tar.xz locusts-3e83931fd2e47bc09fb4e9bebfcdf9246c7219f8.tar.zst locusts-3e83931fd2e47bc09fb4e9bebfcdf9246c7219f8.zip |
Add versioning to CMake and Meson
Signed-off-by: Matt Strapp <matt@mattstrapp.net>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 4740aec..8f770a0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,11 +10,13 @@ set_target_properties(objlib PROPERTIES LINKER_LANGUAGE C) add_library(ocusts SHARED $<TARGET_OBJECTS:objlib> include/locusts.h) target_link_libraries(ocusts PUBLIC objlib) set_target_properties(ocusts PROPERTIES LINKER_LANGUAGE C) +set_target_properties(ocusts PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR}) add_library(ocusts_static STATIC $<TARGET_OBJECTS:objlib> include/locusts.h) target_link_libraries(ocusts_static PUBLIC objlib) set_target_properties(ocusts_static PROPERTIES LINKER_LANGUAGE C) +# Make autoconf and cmake agree with each other set(prefix ${CMAKE_INSTALL_PREFIX}) set(libdir $\${prefix}/${CMAKE_INSTALL_LIBDIR}) set(includedir \${prefix}/${CMAKE_INSTALL_INCLUDEDIR}) |