-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ea12ca9
commit e6eb5a5
Showing
52 changed files
with
534 additions
and
743 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,49 +8,50 @@ | |
# Unless required by applicable law or agreed to in writing, software is distributed under the License is | ||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or | ||
# implied. See the License for the specific language governing permissions and limitations under the License. | ||
include(GNUInstallDirs) | ||
include(CMakePackageConfigHelpers) | ||
|
||
include("GNUInstallDirs") | ||
include("CMakePackageConfigHelpers") | ||
|
||
if (NOT DEFINED omega_edit_INSTALL_CMAKEDIR) | ||
set(omega_edit_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake/omega_edit" CACHE STRING "Path to omega_edit CMake files") | ||
endif () | ||
set(omega_edit_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake/omega_edit" CACHE STRING "Path to omega_edit CMake files") | ||
endif() | ||
|
||
install(TARGETS omega_edit EXPORT omega_edit_Targets RUNTIME COMPONENT omega_edit_Runtime LIBRARY COMPONENT omega_edit_Runtime NAMELINK_COMPONENT omega_edit_Development ARCHIVE COMPONENT omega_edit_Development INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") | ||
install(DIRECTORY "${omega_edit_SOURCE_DIR}/src/include/" TYPE INCLUDE COMPONENT omega_edit_Development) | ||
|
||
if (BUILD_SHARED_LIBS) | ||
set(type shared) | ||
else () | ||
set(type static) | ||
endif () | ||
set(type "shared") | ||
else() | ||
set(type "static") | ||
endif() | ||
|
||
install(EXPORT omega_edit_Targets DESTINATION "${omega_edit_INSTALL_CMAKEDIR}" NAMESPACE omega_edit:: FILE "omega_edit-${type}-targets.cmake" COMPONENT omega_edit_Development) | ||
write_basic_package_version_file(omega_editConfigVersion.cmake COMPATIBILITY SameMajorVersion) | ||
install(EXPORT omega_edit_Targets DESTINATION "${omega_edit_INSTALL_CMAKEDIR}" NAMESPACE "omega_edit::" FILE "omega_edit-${type}-targets.cmake" COMPONENT omega_edit_Development) | ||
write_basic_package_version_file("omega_editConfigVersion.cmake" COMPATIBILITY SameMajorVersion) | ||
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/omega_editConfig.cmake" "${CMAKE_CURRENT_BINARY_DIR}/omega_editConfigVersion.cmake" DESTINATION "${omega_edit_INSTALL_CMAKEDIR}" COMPONENT omega_edit_Development) | ||
|
||
# see: https://www.scivision.dev/cmake-cpack-basic/ | ||
set(_fmt TGZ) | ||
if(WIN32) | ||
set(_fmt ZIP) | ||
set(_fmt "TGZ") | ||
if (WIN32) | ||
set(_fmt "ZIP") | ||
endif() | ||
set(CPACK_GENERATOR ${_fmt}) | ||
set(CPACK_SOURCE_GENERATOR ${_fmt}) | ||
set(CPACK_GENERATOR "${_fmt}") | ||
set(CPACK_SOURCE_GENERATOR "${_fmt}") | ||
set(CPACK_PACKAGE_VENDOR "Concurrent Technologies Corporation") | ||
set(CPACK_PACKAGE_CONTACT "[email protected]") | ||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/../LICENSE.txt") | ||
set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/../README.md") | ||
set(CPACK_OUTPUT_FILE_PREFIX "${CMAKE_BINARY_DIR}/package") | ||
set(CPACK_PACKAGE_DIRECTORY ${CMAKE_BINARY_DIR}) | ||
string(TOLOWER ${CMAKE_SYSTEM_NAME} _sys) | ||
string(TOLOWER ${PROJECT_NAME} _project_lower) | ||
set(CPACK_PACKAGE_DIRECTORY "${CMAKE_BINARY_DIR}") | ||
string(TOLOWER "${CMAKE_SYSTEM_NAME}" _sys) | ||
string(TOLOWER "${PROJECT_NAME}" _project_lower) | ||
set(CPACK_PACKAGE_FILE_NAME "${_project_lower}-${_sys}") | ||
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${_project_lower}-${PROJECT_VERSION}") | ||
|
||
# not .gitignore as its regex syntax is distinct | ||
file(READ ${CMAKE_CURRENT_LIST_DIR}/.cpack_ignore _cpack_ignore) | ||
string(REGEX REPLACE "\n" ";" _cpack_ignore ${_cpack_ignore}) | ||
file(READ "${CMAKE_CURRENT_LIST_DIR}/.cpack_ignore" _cpack_ignore) | ||
string(REGEX REPLACE "\n" ";" _cpack_ignore "${_cpack_ignore}") | ||
set(CPACK_SOURCE_IGNORE_FILES "${_cpack_ignore}") | ||
|
||
install(FILES ${CPACK_RESOURCE_FILE_README} ${CPACK_RESOURCE_FILE_LICENSE} DESTINATION "${CMAKE_INSTALL_DOCDIR}") | ||
install(FILES "${CPACK_RESOURCE_FILE_README}" "${CPACK_RESOURCE_FILE_LICENSE}" DESTINATION "${CMAKE_INSTALL_DOCDIR}") | ||
|
||
include(CPack) | ||
include("CPack") |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.