-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved CMake install and CPack behaviour (#35)
- FineFTP Sever now properly installs dll/so files when BUILD_SHARED_LIBS is ON - FineFTP can now be packed with CPack - Added CMake option to disable building the example Project - Added integration_test project that can be build against an install to perform a very simple automated link and runtime test - Created GH Actions that properly compile and package binaries for windows and Linux
- Loading branch information
1 parent
5713cfd
commit 78efc7f
Showing
14 changed files
with
299 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ ipch | |
*.opendb | ||
*.db | ||
/_build | ||
/samples/integration_test/_build | ||
/_install | ||
/.vs | ||
/CMakeLists.txt.user | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,34 @@ | ||
cmake_minimum_required(VERSION 3.5.1) | ||
|
||
set(CMAKE_CXX_STANDARD 14) | ||
# Project call | ||
include("${CMAKE_CURRENT_LIST_DIR}/fineftp-server/version.cmake") | ||
project(fineftp VERSION ${FINEFTP_SERVER_VERSION_MAJOR}.${FINEFTP_SERVER_VERSION_MINOR}.${FINEFTP_SERVER_VERSION_PATCH}) | ||
|
||
# Normalize backslashes from Windows paths | ||
file(TO_CMAKE_PATH "${CMAKE_MODULE_PATH}" CMAKE_MODULE_PATH) | ||
file(TO_CMAKE_PATH "${CMAKE_PREFIX_PATH}" CMAKE_PREFIX_PATH) | ||
message(STATUS "Module Path: ${CMAKE_MODULE_PATH}") | ||
message(STATUS "Prefix Path: ${CMAKE_PREFIX_PATH}") | ||
|
||
# CMake Options | ||
option(FINEFTP_SERVER_BUILD_SAMPLES | ||
"Build project samples" | ||
ON) | ||
|
||
# Module path for finding asio | ||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) | ||
|
||
project(fineftp) | ||
# Set Debug postfix | ||
set(CMAKE_DEBUG_POSTFIX d) | ||
set(CMAKE_MINSIZEREL_POSTFIX minsize) | ||
set(CMAKE_RELWITHDEBINFO_POSTFIX reldbg) | ||
|
||
set(as_subproject fineftp) | ||
# Add main fineftp::server library | ||
add_subdirectory(fineftp-server) | ||
|
||
string(COMPARE EQUAL "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_SOURCE_DIR}" _cmp) | ||
if (_cmp) | ||
macro(find_package) | ||
if(NOT "${ARGV0}" IN_LIST as_subproject) | ||
_find_package(${ARGV}) | ||
endif() | ||
endmacro() | ||
if (FINEFTP_SERVER_BUILD_SAMPLES) | ||
add_subdirectory(samples/fineftp_example) | ||
endif() | ||
|
||
add_subdirectory(fineftp-server) | ||
add_subdirectory(example) | ||
# Make this package available for packing with CPack | ||
include("${CMAKE_CURRENT_LIST_DIR}/cpack_config.cmake") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Stub find script for in-source build of samples | ||
set(fineftp_FOUND True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
set(CPACK_PACKAGE_NAME ${PROJECT_NAME}) | ||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "An FTP Server library for creating embedded FTP Servers") | ||
set(CPACK_PACKAGE_VENDOR "Eclipse eCAL") | ||
set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION}) | ||
set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) | ||
set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR}) | ||
set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH}) | ||
set(CPACK_PACKAGE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/_package") | ||
|
||
set(CPACK_PACKAGE_CONTACT "[email protected]") | ||
|
||
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Florian Reimold <[email protected]>") | ||
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://github.com/eclipse-ecal/fineftp-server") | ||
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) | ||
set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON) | ||
|
||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_LIST_DIR}/LICENSE") | ||
set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_LIST_DIR}/README.md") | ||
|
||
include(CPack) |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.