Skip to content

Conversation

@tgorol
Copy link
Contributor

@tgorol tgorol commented Sep 12, 2016

The CMakeLists.txt file a main build script.

I have added some extra build scripts to detect Jansson and Check libraries. They are in the CMakeModules directory.

I have created a include\cjose\config.in file. It contains some #defines around supported functions and existing types.

#include <stdlib.h>

#ifndef HAVE_RANDOM
int random(void)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some platforms (Windows) don't have the random() function. Here we create our own.


#cmakedefine HAVE_RANDOM

#cmakedefine HAVE_SSIZE_T
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not all platforms have ssize_t.

set(CJOSE_MAJOR_VERSION 0)
set(CJOSE_MINOR_VERSION 4)
set(CJOSE_PATCH_VERSION 1)
set(PACKAGE_VERSION ${CJOSE_MAJOR_VERSION}.${CJOSE_MINOR_VERSION}.${CJOSE_PATCH_VERSION})
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Set cjose version.

endif((NOT ${PKG_NAME}_INCLUDE_DIR) OR (NOT ${PKG_NAME}_LIBRARIES))
endfunction(GetRootDirForHomebrew PKG_NAME)

if(CMAKE_C_COMPILER_ID MATCHES "AppleClang")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add priority to homebrew versions of openssl, jansson and check. We can always specify custom locations of those packages by passing OPENSSL_ROOT_DIR, JANSSON_ROOT_DIR and CHECK_ROOT_DIR to our cmake invocation.

@sergey-chernikov sergey-chernikov mentioned this pull request Nov 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant