-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Soroush Rabiei <[email protected]>
- Loading branch information
Soroush Rabiei
committed
Jan 20, 2021
1 parent
d9b5444
commit 778e6a5
Showing
72 changed files
with
232 additions
and
45,902 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 |
---|---|---|
@@ -1 +1 @@ | ||
Soroush Rabiei <soroush@ametisco.ir> | ||
Soroush Rabiei <soroush[email protected]> |
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,90 @@ | ||
cmake_minimum_required(VERSION 3.16.0) | ||
|
||
project(libcalendars VERSION 1.0.1 LANGUAGES C) | ||
|
||
include(CTest) | ||
|
||
set(LIBCAL_SOURCES | ||
src/cl-math.h | ||
src/cl-math.c | ||
src/cl-calendars.c | ||
src/cl-gregorian.c | ||
src/cl-julian.c | ||
src/cl-milankovic.c | ||
src/cl-solar-hijri.c | ||
src/cl-islamic-civil.c | ||
src/cl-jewish.c | ||
) | ||
|
||
if(WIN32) | ||
list(APPEND LIBCAL_SOURCES win32/libcalendars.rc) | ||
endif() | ||
|
||
# Define the library | ||
add_library(${PROJECT_NAME} SHARED ${LIBCAL_SOURCES}) | ||
|
||
# Mark all public headers | ||
file(GLOB_RECURSE ALL_HEADER_FILES "include/libcalendars/*.h") | ||
|
||
# Prepate the target | ||
set_target_properties(${PROJECT_NAME} PROPERTIES | ||
C_STANDARD 11 | ||
DEBUG_POSTFIX "_d" | ||
PUBLIC_HEADER "${ALL_HEADER_FILES}" | ||
) | ||
|
||
target_include_directories(${PROJECT_NAME} | ||
PUBLIC | ||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src> | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
PRIVATE | ||
${CMAKE_CURRENT_SOURCE_DIR}/src | ||
) | ||
|
||
# Testing | ||
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING) | ||
enable_testing() | ||
add_subdirectory(tests) | ||
endif() | ||
|
||
# Generate package config file | ||
|
||
include(CMakePackageConfigHelpers) | ||
|
||
configure_package_config_file(libcalendars.pc.in libcalendars.pc | ||
INSTALL_DESTINATION ${LIB_INSTALL_DIR}/libcalendars | ||
) | ||
|
||
# Installation | ||
|
||
include(GNUInstallDirs) | ||
|
||
export(TARGETS ${PROJECT_NAME} FILE "${PROJECT_NAME}Targets.cmake") | ||
|
||
install(TARGETS ${PROJECT_NAME} | ||
EXPORT "${PROJECT_NAME}Targets" | ||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} | ||
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libcalendars | ||
) | ||
|
||
include(CMakePackageConfigHelpers) | ||
write_basic_package_version_file( | ||
"${PROJECT_NAME}ConfigVersion.cmake" | ||
VERSION ${PROJECT_VERSION} | ||
COMPATIBILITY SameMajorVersion | ||
) | ||
|
||
install(EXPORT "${PROJECT_NAME}Targets" | ||
FILE "${PROJECT_NAME}Targets.cmake" | ||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ | ||
) | ||
|
||
install(FILES | ||
"cmake/${PROJECT_NAME}Config.cmake" | ||
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake" | ||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,7 @@ This Code of Conduct applies both within project spaces and in public spaces whe | |
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at soroush@ametisco.ir. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. | ||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at soroush[email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. | ||
|
||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. | ||
|
||
|
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,4 +1,4 @@ | ||
2017-08-29 Soroush Rabiei <soroush@ametisco.ir> | ||
2017-08-29 Soroush Rabiei <soroush[email protected]> | ||
|
||
* *.*: Initial implementation for Solar Hijri calendar added. | ||
|
Oops, something went wrong.