update README and CmakeLists for macOS

This commit is contained in:
Evan Burkey 2022-09-09 11:15:05 -07:00
parent b0b6773395
commit 5b68940efc
2 changed files with 5 additions and 3 deletions

View File

@ -31,9 +31,11 @@ elseif ((${CMAKE_SYSTEM_NAME} STREQUAL "Linux"))
find_package(OpenSSL REQUIRED) find_package(OpenSSL REQUIRED)
target_link_libraries(advent PRIVATE bsd flint ${OPENSSL_LIBRARIES}) target_link_libraries(advent PRIVATE bsd flint ${OPENSSL_LIBRARIES})
target_include_directories(advent PRIVATE include lib/libflint/include lib/uthash/src ${OpenSSL_INCLUDE_DIR}) target_include_directories(advent PRIVATE include lib/libflint/include lib/uthash/src ${OpenSSL_INCLUDE_DIR})
else() # Basically MacOS/Darwin elseif ((${CMAKE_SYSTEM_NAME} STREQUAL "Darwin"))
set(OpenSSL_INCLUDE_DIR /opt/homebrew/opt/openssl@3/include) set(OpenSSL_INCLUDE_DIR /opt/homebrew/opt/openssl@3/include)
find_package(OpenSSL REQUIRED) find_package(OpenSSL REQUIRED)
target_link_libraries(advent PRIVATE flint ${OPENSSL_LIBRARIES}) target_link_libraries(advent PRIVATE flint ${OPENSSL_LIBRARIES})
target_include_directories(advent PRIVATE include lib/libflint/include lib/uthash/src ${OpenSSL_INCLUDE_DIR}) target_include_directories(advent PRIVATE include lib/libflint/include lib/uthash/src ${OpenSSL_INCLUDE_DIR})
else()
message( FATAL_ERROR "OS ${CMAKE_SYSTEM_NAME} is not supported" )
endif() endif()

View File

@ -1,6 +1,6 @@
# aoc # aoc
Advent Of Code solutions using C99. Advent Of Code solutions using C99. Builds and runs on macOS, Linux, and OpenBSD.
## Building ## Building
@ -8,7 +8,7 @@ Be sure to clone the project with its submodules:
git clone --recurse-submodules https://git.fputs.com/fputs/advent git clone --recurse-submodules https://git.fputs.com/fputs/advent
This project relies on several BSD extensions to the stdlib. BSDs should be able to build the project out of the box. Linux users will need `libbsd` installed. The package is called `libbsd-dev` on Debian-based systems. This project relies on several BSD extensions to the stdlib. OpenBSD and macOS users should be able to build the project out of the box. Linux users will need `libbsd` installed. The package is called `libbsd-dev` on Debian-based systems.
Build the project using Cmake: Build the project using Cmake: