From 9de49efc383a2ffe731cb9325b99b0ba5c3fd4c9 Mon Sep 17 00:00:00 2001 From: Samuel Marks <807580+SamuelMarks@users.noreply.github.com> Date: Sat, 23 Oct 2021 09:54:23 -0400 Subject: [PATCH] CMake init --- .gitignore | 4 ++ CMakeLists.txt | 98 ++++++++++++++++++++++++++++++++ cmake/BundleIcon.icns | Bin 0 -> 33452 bytes cmake/CTestConfig.cmake | 7 +++ cmake/Config.cmake.in | 4 ++ cmake/CustomVolumeIcon.icns | Bin 0 -> 37827 bytes cmake/Info.plist | 14 +++++ cmake/MultiCPackConfig.cmake | 6 ++ cmake/README.txt | 1 + cmake/Welcome.txt | 3 + cmake/config.h.in | 9 +++ cmake/modules/FindJansson.cmake | 41 +++++++++++++ lib/CMakeLists.txt | 64 +++++++++++++++++++++ tests/CMakeLists.txt | 58 +++++++++++++++++++ tests/clar/CMakeLists.txt | 52 +++++++++++++++++ 15 files changed, 361 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 cmake/BundleIcon.icns create mode 100644 cmake/CTestConfig.cmake create mode 100644 cmake/Config.cmake.in create mode 100644 cmake/CustomVolumeIcon.icns create mode 100644 cmake/Info.plist create mode 100644 cmake/MultiCPackConfig.cmake create mode 100644 cmake/README.txt create mode 100644 cmake/Welcome.txt create mode 100644 cmake/config.h.in create mode 100644 cmake/modules/FindJansson.cmake create mode 100644 lib/CMakeLists.txt create mode 100644 tests/CMakeLists.txt create mode 100644 tests/clar/CMakeLists.txt diff --git a/.gitignore b/.gitignore index 2740b46..d758977 100644 --- a/.gitignore +++ b/.gitignore @@ -55,3 +55,7 @@ tests/clar.suite tests/.clarcache tests/*.trs test-driver + +.idea +*_export.h +*build* diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..d9146b6 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,98 @@ +cmake_minimum_required(VERSION 3.0) +project(searpc VERSION 0.0.1 LANGUAGES C) + +set(CMAKE_C_STANDARD 90) +cmake_policy(SET CMP0063 NEW) +set(CMAKE_C_VISIBILITY_PRESET hidden) +set(CMAKE_VISIBILITY_INLINES_HIDDEN YES) + +option(BUILD_SHARED_LIBS "Build using shared libraries" OFF) +if (BUILD_SHARED_LIBS) + set(LIBRARY_TYPE_FLAG "SHARED") +else () + set(LIBRARY_TYPE_FLAG "STATIC") +endif () + +# control where the static and shared libraries are built so that on windows +# we don't need to tinker with the path to run the executable +set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}") +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}") +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}") + +add_library("${PROJECT_NAME}_compiler_flags" INTERFACE) +target_compile_features("${PROJECT_NAME}_compiler_flags" INTERFACE "c_std_${CMAKE_C_STANDARD}") + +set(gcc_like "$") +set(msvc "$") +# -g -fsanitize=address -fno-omit-frame-pointer +target_compile_options( + "${PROJECT_NAME}_compiler_flags" + INTERFACE + "$<${gcc_like}:$>" + "$<${msvc}:$>" +) +if (CMAKE_C_COMPILER_ID STREQUAL "Clang" OR CMAKE_C_COMPILER_ID STREQUAL "AppleClang") + set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address") + set(CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address") +endif() + +# configure a header file to pass the version number only +configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/config.h.in" + "${PROJECT_NAME}Config.h" +) + +add_subdirectory("lib") + +option(BUILD_TESTS "Build tests" ON) +if (BUILD_TESTS) + add_subdirectory("tests") +endif (BUILD_TESTS) + +install( + FILES "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.h" + DESTINATION "include" +) + +include(InstallRequiredSystemLibraries) +set(CPACK_BUNDLE_NAME "${PROJECT_NAME}") +set(CPACK_PACKAGE_VENDOR "seafile.com") +set(CPACK_PACKAGE_DESCRIPTION "A simple C language RPC framework (including both server side & client side). Python binding is also provided.") +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Searpc is a simple C language RPC framework based on GObject system.") +if (APPLE) + set(CPACK_BUNDLE_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Info.plist") + set(CPACK_BUNDLE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Info.plist") + set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/cmake/CustomVolumeIcon.icns") +endif() +set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt") +set(CPACK_PACKAGE_VERSION_MAJOR "${${PROJECT_NAME}_VERSION_MAJOR}") +set(CPACK_PACKAGE_VERSION_MINOR "${${PROJECT_NAME}_VERSION_MINOR}") +set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/cmake/README.txt") +set(CPACK_RESOURCE_FILE_WELCOME "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Welcome.txt") +set(CPACK_PACKAGE_CONTACT "https://github.com/haiwen/lib${PROJECT_NAME}") + +include(CPack) +include(CMakePackageConfigHelpers) + +option(BUILD_SHARED_LIBS "Build using shared libraries" ON) +if (BUILD_SHARED_LIBS) + set(LIBRARY_TYPE_FLAG "SHARED") +else () + set(LIBRARY_TYPE_FLAG "STATIC") +endif () + +# generate the config file that is includes the exports +configure_package_config_file( + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Config.cmake.in" + "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" + INSTALL_DESTINATION "lib/cmake/example" + NO_SET_AND_CHECK_MACRO + NO_CHECK_REQUIRED_COMPONENTS_MACRO +) + +# generate the version file for the config file +write_basic_package_version_file( + "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake" + VERSION "${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}" + COMPATIBILITY AnyNewerVersion +) diff --git a/cmake/BundleIcon.icns b/cmake/BundleIcon.icns new file mode 100644 index 0000000000000000000000000000000000000000..8808dd62db64540292417e8865bdf627aaf8792e GIT binary patch literal 33452 zcmeHOdvsOhmH+ND3E@$o&e9H@%&P5L{1ctwU<;)Zs`WM6I?kfg89Hmm+L^0ZX+AG~=i2H|SAQD9-)Q>fD~)-u>8^1*OsmxG8t_@661U4VtWdGrGhpEVfg-oZ zqz$XkEe8CC%M4iq1#V%=&5)H3X~1xsA&B#&7*PI@uyUoj)9l2a!x{)kozrJp0Vw@$ zC(r}JVVM4q+Zu4Y%>v;y{8lLB9w;$fKH!xNh!7DoiI`z9F<~+>VJKokm_#gKI3Z$Q ze#nScuHh08YE~x6ZC2QG7+~cz4WHii!!JArk@6Qm@Z-~z0+ypwGxAy%0&d!jEZRb> zBqPgTEL@=DD>WQUX61qvKSB=E#n69L1QCB+6=6ZlKJ7*x5wp*`VS|``y{ipk_QShu z5VIe-O9nCf(Yu59?z#OtxF&QQ{MhW|m+O)c^h*1HUo)->L9eW9{L1-M2zsrCPkMzy zetIFio%C{rLYL^377BepuNk4xReELd>sn4IbZvDg^eO!>>_7jc`CtARUDNI_?ib>X zO~Tpd`=5=1E<01W`wY|SuM=*c;R{){!rN!iM*jxk_0d+yS}#Ojz`)sB{WU`Pu!#%O zs)jVzaMNc0I*4-(T)?=9t02#l+YYOLEfm->>FTb8B42Jpu?7n4_;aDCfT943T&xKF z?hq;l#yT4n40=c~BT@NsANh$2w&h z)j%^X%P$=LW-Xi#AjMbf1{#G9v>^kH3m0s$W^kZ!vbAy_%M${PD;^7#@ToxKx>kV( zn2+NO2ZjnWu6rK`nN~^_;#>$Rzy)&oRN>8okb+xiPyJbQ3_7b1jzvnGCY!#wJBMPpa?$>z0Eli;ar4&cJqDK>(xZ z2dQHKM$r$Ujsh4(KcqSWU=;l@Y8zk_{jh3vtqiZ11|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`dGZ1g~6YW3V=qI`Y#^XP66)>LcCo%)$$$ldJk0<(xtbp?gwiM53RF3Ye(>iB-Tvvp>-c zOf>rw^*_<*PqYFO;eY%UkcjM0Bm;@a{zUvIBKi}lfJFHpUj-y8`{T_(qOw0;|A~tJ zcq<^0{^PHJL}q_H8AxRI$KyYd(H~C*B-(#`6_Duc$D4sfXFp#5iH?4}6_5=7W3PZ@ zWIvt^BqRIr_)kXk+`e{%{#cRrZJTpQ`8&R{^Q?Kez%?nf;+6kjm_n|JVqmGWz5{_BS)1`RAyl?mhZ9 tOR28E*!-vZ`iu211pSsWm4C6nTBP5Srt)v{ezlppUr2uD>HmEM{tp8ay}tke literal 0 HcmV?d00001 diff --git a/cmake/CTestConfig.cmake b/cmake/CTestConfig.cmake new file mode 100644 index 0000000..08366b6 --- /dev/null +++ b/cmake/CTestConfig.cmake @@ -0,0 +1,7 @@ +set(CTEST_PROJECT_NAME "searpc") +set(CTEST_NIGHTLY_START_TIME "00:00:00 EST") + +set(CTEST_DROP_METHOD "http") +set(CTEST_DROP_SITE "my.cdash.org") +set(CTEST_DROP_LOCATION "/submit.php?project=searpc") +set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/cmake/Config.cmake.in b/cmake/Config.cmake.in new file mode 100644 index 0000000..afbdcfd --- /dev/null +++ b/cmake/Config.cmake.in @@ -0,0 +1,4 @@ + +@PACKAGE_INIT@ + +include ( "${CMAKE_CURRENT_LIST_DIR}/libumkaTargets.cmake" ) diff --git a/cmake/CustomVolumeIcon.icns b/cmake/CustomVolumeIcon.icns new file mode 100644 index 0000000000000000000000000000000000000000..3862a51917954ff9c92cfe8e7469c4b12525796b GIT binary patch literal 37827 zcmeI4`EOgj0}mY0!jd6Q+W*1lQ$W=SNqZ(g)myGV)@DN@|u?K$uAiIhajo&-VC&KtnM zNbj6`&pG#=``-J!ul?Q+fA;gFq`aQ@e*U$;NJ=`^c8rj4dN4_1$jM#P%JS;k`li)p z-+IN6k5}5A)-C(C)8*dv4u=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IzOj;B4!?AwX7`}NS0=ucC&$|3*Ge!Czk$S8QS73`Hv#gc z@x&rre42W##8=VmD$IAk#5Zk^`6{Aah51s5i^^A!1jl2(iX@maUj-4P4mYatP2JP@ z?vw3OT`h($!l(48$Tu|teQj2YA%^=#Ww6#s69rrkNZY+zUB>E z2JE=Qy4^$IcTeYQh=66P3l?Rttmt;%jQdi;no#GPjto-~`eF*Pq&N=vo!t}qQt+!d zd`9j|)yEOw`Fg3Z=t_cDtEim#GYNeW79$@`NPgqe;z(?Xb-s#MjHLJtbiNVti<;H_ z3kzmy&?FG3Vl%>s~}l1p3rxGpV0RZ_!U9Gaaibk5d2~;QQ2-{@Vj4u z%Yrl*=pqmAVsXK5tkUqLaUX;Gmsu;PP0O3jdB9L;?Z zOdiw*zn1$_E*U8RRqY-Peh=YKgb4}AZ&ZWK%iKE_FDC@Q!nOt#kWoo7q8XX}V%ZXj zePflloU)wAE;Qjd0C;H|6~(bK%e_e`YmB4!#f8~Fi!6>-Er35(6926_XL%@iP z_d7&2!f_BV)%-?zYm}cMZ;gk5QS+!!5?P86s8~4=EjlzF2~4zDFappjxYO-$AA%Y@00z; zgTT?jvGrvkuR?*-qOxC^N8<-CS`wufWvuEv2VQMzAc?G>>5THP-dnPQSxkQg7< z{VKRNnj#wK9;y39Vho3R6lV&DF|Z>1jcyM*t|5-_mx*xv{dM~c!e10u$HBmBZv3mT z@nCf3VGIoafZ0J?s@euyMfRJj$bQ|RtYP7;5*79I^9r8SuZ6&ovf=8X5c}6w{T`d2 zn`33=FCgH;1wwRrRl`{{5X(|9&92JY6a8^s1;BvpjJSwfLZ~y0%`@+3aAxOE1*_Dt$(s+eu0P3)=f^qW}N^ literal 0 HcmV?d00001 diff --git a/cmake/Info.plist b/cmake/Info.plist new file mode 100644 index 0000000..e5a7d00 --- /dev/null +++ b/cmake/Info.plist @@ -0,0 +1,14 @@ + + + + + CFBundleExecutable + BundleGeneratorTest + CFBundleIconFile + BundleGeneratorTest.icns + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + APPL + + diff --git a/cmake/MultiCPackConfig.cmake b/cmake/MultiCPackConfig.cmake new file mode 100644 index 0000000..8904613 --- /dev/null +++ b/cmake/MultiCPackConfig.cmake @@ -0,0 +1,6 @@ +include("release/CPackConfig.cmake") + +set(CPACK_INSTALL_CMAKE_PROJECTS + "debug;searpc;ALL;/" + "release;searpc;ALL;/" +) diff --git a/cmake/README.txt b/cmake/README.txt new file mode 100644 index 0000000..b243b67 --- /dev/null +++ b/cmake/README.txt @@ -0,0 +1 @@ +Searpc is a simple C language RPC framework based on GObject system. diff --git a/cmake/Welcome.txt b/cmake/Welcome.txt new file mode 100644 index 0000000..c4df712 --- /dev/null +++ b/cmake/Welcome.txt @@ -0,0 +1,3 @@ +Searpc is a simple C language RPC framework based on GObject system. + +http://www.seafile.com diff --git a/cmake/config.h.in b/cmake/config.h.in new file mode 100644 index 0000000..e0cd978 --- /dev/null +++ b/cmake/config.h.in @@ -0,0 +1,9 @@ +#ifndef SEARPC_CONFIG_H +#define SEARPC_CONFIG_H + +#define SEARPC_VERSION_MAJOR @SEARPC_VERSION_MAJOR@ +#define SEARPC_VERSION_MINOR @SEARPC_VERSION_MINOR@ +#define SEARPC_VERSION_PATCH @SEARPC_VERSION_PATCH@ +#define SEARPC_VERSION "@SEARPC_VERSION@" + +#endif /* SEARPC_CONFIG_H */ diff --git a/cmake/modules/FindJansson.cmake b/cmake/modules/FindJansson.cmake new file mode 100644 index 0000000..a74dac1 --- /dev/null +++ b/cmake/modules/FindJansson.cmake @@ -0,0 +1,41 @@ +# FROM: https://fossies.org/linux/www/nghttp2-1.46.0.tar.gz/nghttp2-1.46.0/cmake/FindJansson.cmake?m=t +# - Try to find jansson +# Once done this will define +# JANSSON_FOUND - System has jansson +# JANSSON_INCLUDE_DIRS - The jansson include directories +# JANSSON_LIBRARIES - The libraries needed to use jansson + +find_package(PkgConfig QUIET) +pkg_check_modules(PC_JANSSON QUIET jansson) + +find_path(JANSSON_INCLUDE_DIR + NAMES jansson.h + HINTS ${PC_JANSSON_INCLUDE_DIRS} + ) +find_library(JANSSON_LIBRARY + NAMES jansson + HINTS ${PC_JANSSON_LIBRARY_DIRS} + ) + +if(JANSSON_INCLUDE_DIR) + set(_version_regex "^#define[ \t]+JANSSON_VERSION[ \t]+\"([^\"]+)\".*") + file(STRINGS "${JANSSON_INCLUDE_DIR}/jansson.h" + JANSSON_VERSION REGEX "${_version_regex}") + string(REGEX REPLACE "${_version_regex}" "\\1" + JANSSON_VERSION "${JANSSON_VERSION}") + unset(_version_regex) +endif() + +include(FindPackageHandleStandardArgs) +# handle the QUIETLY and REQUIRED arguments and set JANSSON_FOUND to TRUE +# if all listed variables are TRUE and the requested version matches. +find_package_handle_standard_args(Jansson REQUIRED_VARS + JANSSON_LIBRARY JANSSON_INCLUDE_DIR + VERSION_VAR JANSSON_VERSION) + +if(JANSSON_FOUND) + set(JANSSON_LIBRARIES ${JANSSON_LIBRARY}) + set(JANSSON_INCLUDE_DIRS ${JANSSON_INCLUDE_DIR}) +endif() + +mark_as_advanced(JANSSON_INCLUDE_DIR JANSSON_LIBRARY) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt new file mode 100644 index 0000000..935125f --- /dev/null +++ b/lib/CMakeLists.txt @@ -0,0 +1,64 @@ +set(LIBRARY_NAME "searpc") + +set(Header_Files + "searpc-client.h" + "searpc-named-pipe-transport.h" + "searpc-server.h" + "searpc-utils.h" + "searpc.h" +) +source_group("Header Files" FILES "${Header_Files}") + +set(Source_Files + "searpc-client.c" + "searpc-named-pipe-transport.c" + "searpc-server.c" + "searpc-utils.c" +) +source_group("Source Files" FILES "${Source_Files}") + +add_library("${LIBRARY_NAME}" "${LIBRARY_TYPE_FLAG}" "${Header_Files}" "${Source_Files}") + +include(FindPkgConfig) +pkg_check_modules (GLIB2 glib-2.0) +include("../cmake/modules/FindJansson.cmake") +if (NOT JANSSON_FOUND) + message(FATAL_ERROR "JANSSON required") +endif () + +target_include_directories( + "${LIBRARY_NAME}" + PUBLIC + "$" + "$" + "${GLIB2_STATIC_INCLUDE_DIRS}" + "${JANSSON_INCLUDE_DIRS}" +) +target_link_libraries("${LIBRARY_NAME}" PUBLIC "${GLIB2_LINK_LIBRARIES}" "${JANSSON_LIBRARIES}") +set_target_properties( + "${LIBRARY_NAME}" + PROPERTIES + LINKER_LANGUAGE + C +) + +# Symbol exporter +include(GenerateExportHeader) +set(_export_file "${CMAKE_CURRENT_SOURCE_DIR}/${LIBRARY_NAME}_export.h") +generate_export_header("${LIBRARY_NAME}" EXPORT_FILE_NAME "${_export_file}") + +# install rules + +# setup the version numbering +set_property(TARGET "${LIBRARY_NAME}" PROPERTY VERSION "1.0.0") +set_property(TARGET "${LIBRARY_NAME}" PROPERTY SOVERSION "1") + +set(installable_libs "${LIBRARY_NAME}" "${EXEC_NAME}" "${PROJECT_NAME}_compiler_flags") +install(FILES "${Header_Files}" DESTINATION "include") + +if (TARGET "${DEPENDANT_LIBRARY}") + list(APPEND installable_libs "${DEPENDANT_LIBRARY}") +endif () +install(TARGETS ${installable_libs} + DESTINATION "lib" + EXPORT "${LIBRARY_NAME}Targets") diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt new file mode 100644 index 0000000..ea1791b --- /dev/null +++ b/tests/CMakeLists.txt @@ -0,0 +1,58 @@ +set(LIBRARY_NAME "searpctests") +set(EXEC_NAME "searpctest") + +set(Header_Files + "clar.h" + "clar_test.h" +) +source_group("Header Files" FILES "${Header_Files}") + +set(Source_Files + "clar.c" + "searpc.c" +) +source_group("Source Files" FILES "${Source_Files}") + +add_library("${LIBRARY_NAME}" "${LIBRARY_TYPE_FLAG}" "${Header_Files}" "${Source_Files}") + +target_include_directories( + "${LIBRARY_NAME}" + PUBLIC + "$" + "$" +) +target_link_libraries("${LIBRARY_NAME}" PUBLIC "clar" "searpc") +set_target_properties( + "${LIBRARY_NAME}" + PROPERTIES + LINKER_LANGUAGE + C +) + +# Symbol exporter +include(GenerateExportHeader) +set(_export_file "${CMAKE_CURRENT_SOURCE_DIR}/${LIBRARY_NAME}_export.h") +generate_export_header("${LIBRARY_NAME}" EXPORT_FILE_NAME "${_export_file}") + +# Exec target + +source_group("${EXEC_NAME} Source Files" FILES "main.c") +add_executable("${EXEC_NAME}" "main.c") + +target_link_libraries("${EXEC_NAME}" PRIVATE "${LIBRARY_NAME}") + +# install rules + +# setup the version numbering +set_property(TARGET "${LIBRARY_NAME}" PROPERTY VERSION "1.0.0") +set_property(TARGET "${LIBRARY_NAME}" PROPERTY SOVERSION "1") + +set(installable_libs "${LIBRARY_NAME}" "${EXEC_NAME}" "${PROJECT_NAME}_compiler_flags") +install(FILES "${Header_Files}" DESTINATION "include") + +if (TARGET "${DEPENDANT_LIBRARY}") + list(APPEND installable_libs "${DEPENDANT_LIBRARY}") +endif () +install(TARGETS ${installable_libs} + DESTINATION "lib" + EXPORT "${LIBRARY_NAME}Targets") diff --git a/tests/clar/CMakeLists.txt b/tests/clar/CMakeLists.txt new file mode 100644 index 0000000..221a90f --- /dev/null +++ b/tests/clar/CMakeLists.txt @@ -0,0 +1,52 @@ +set(LIBRARY_NAME "clar") + +set(Header_Files + "fixtures.h" + "fs.h" + "print.h" + "sandbox.h" +) +source_group("Header Files" FILES "${Header_Files}") + +add_library("${LIBRARY_NAME}" INTERFACE "${Header_Files}") + +target_include_directories( + "${LIBRARY_NAME}" + PUBLIC + "$" + "$" +) +set_target_properties( + "${LIBRARY_NAME}" + PROPERTIES + LINKER_LANGUAGE + C +) + +# Symbol exporter +include(GenerateExportHeader) +set(_export_file "${CMAKE_CURRENT_SOURCE_DIR}/${LIBRARY_NAME}_export.h") +generate_export_header("${LIBRARY_NAME}" EXPORT_FILE_NAME "${_export_file}") + +# Exec target + +source_group("${EXEC_NAME} Source Files" FILES "main.c") +add_executable("${EXEC_NAME}" "main.c") + +target_link_libraries("${EXEC_NAME}" PRIVATE "${LIBRARY_NAME}") + +# install rules + +# setup the version numbering +set_property(TARGET "${LIBRARY_NAME}" PROPERTY VERSION "1.0.0") +set_property(TARGET "${LIBRARY_NAME}" PROPERTY SOVERSION "1") + +set(installable_libs "${LIBRARY_NAME}" "${EXEC_NAME}" "${PROJECT_NAME}_compiler_flags") +install(FILES "${Header_Files}" DESTINATION "include") + +if (TARGET "${DEPENDANT_LIBRARY}") + list(APPEND installable_libs "${DEPENDANT_LIBRARY}") +endif () +install(TARGETS ${installable_libs} + DESTINATION "lib" + EXPORT "${LIBRARY_NAME}Targets")