Migrate structure, bump to 1.1.1

This commit is contained in:
Václav Valíček 2020-05-17 22:17:59 +02:00
parent 3a443ebe93
commit dd2e527276
3 changed files with 6 additions and 6 deletions

View File

@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.9) cmake_minimum_required(VERSION 3.9)
# project properties, version etc # project properties, version etc
project(test_shared_library LANGUAGES C VERSION 1.0.3 DESCRIPTION "Shared C Library for testing of various cmake configurations") project(test_shared_library LANGUAGES C VERSION 1.1.1 DESCRIPTION "Shared C Library for testing of various cmake configurations")
set(CMAKE_C_STANDARD 99) set(CMAKE_C_STANDARD 99)
# include GNU Install dirs # include GNU Install dirs
include(GNUInstallDirs) include(GNUInstallDirs)
@ -8,22 +8,22 @@ include(GNUInstallDirs)
enable_testing() enable_testing()
# define library # define library
add_library(test_shared_library SHARED test_shared_library.c test_shared_library.h) add_library(test_shared_library SHARED src/test_shared_library.c include/test_shared_library.h)
# library properties - dynamic # library properties - dynamic
set_target_properties(test_shared_library PROPERTIES set_target_properties(test_shared_library PROPERTIES
VERSION ${PROJECT_VERSION} VERSION ${PROJECT_VERSION}
SOVERSION 1 SOVERSION 1
PUBLIC_HEADER test_shared_library.h) PUBLIC_HEADER include/test_shared_library.h)
# pkg-config stuff # pkg-config stuff
configure_file(test_shared_library.pc.in test_shared_library.pc @ONLY) configure_file(test_shared_library.pc.in test_shared_library.pc @ONLY)
#target_include_directories(test_shared_library PRIVATE .) #target_include_directories(test_shared_library PRIVATE .)
target_include_directories(${PROJECT_NAME} PUBLIC target_include_directories(${PROJECT_NAME} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:> $<INSTALL_INTERFACE:include>
PRIVATE .) PRIVATE src)
# export native cmake package # export native cmake package
install(TARGETS test_shared_library EXPORT test_shared_libraryConfig install(TARGETS test_shared_library EXPORT test_shared_libraryConfig