Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CMake support for RHash #103

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

uilianries
Copy link

@uilianries uilianries commented Dec 19, 2019

Hi!

This PR brings two CMake files which can build the library and executable.

I see you are running semaphore to build this project, but I can't update it locally, so you can update your script with:

mkdir cmake && pushd cmake
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../results
cmake --build . --target install
popd
/usr/bin/find results/ -exec ls -ld '{}' ';'

Regards!

@wdlkmpx
Copy link

wdlkmpx commented Jun 14, 2023

I have issues cross compiling static stuff, this might help

This should be merged, if we believe in true justice ...

CMakeLists.txt Outdated

option(USE_GETTEXT "Enable gettext (localization) support")

set(SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/calc_sums.c"

Choose a reason for hiding this comment

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

no need for CMAKE_CURRENT_SOURCE_DIR, files are always relative to the source dir

option(USE_OPENSSL "Enable OpenSSL (optimized hash functions) support")
option(OPENSSL_RUNTIME "Load OpenSSL at runtime if present")

set(SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/algorithms.c"

Choose a reason for hiding this comment

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

same

install(TARGETS ${PROJECT_NAME}
EXPORT ${CMAKE_PROJECT_NAME}Config
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
Copy link

Choose a reason for hiding this comment

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

if you use gnuinstalldirs then you can use CMAKE_INSTALL_LIBDIR/BINDIR/INCLUDEDIR


include(GNUInstallDirs)

if(MSVC OR MSVC90 OR MSVC10)

Choose a reason for hiding this comment

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

MSVC90/MSVC10 already imply MSVC

include(GNUInstallDirs)

if(MSVC OR MSVC90 OR MSVC10)
set(MSVC ON)

Choose a reason for hiding this comment

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

uneeded

Signed-off-by: Uilian Ries <[email protected]>
valgur added a commit to valgur/conan-center-index that referenced this pull request Nov 6, 2023
The build scripts in the project are quite non-standard and not too portable.

Based on rhash/RHash#103
valgur added a commit to valgur/conan-center-index that referenced this pull request Jan 19, 2024
The build scripts in the project are quite non-standard and not too portable.

Based on rhash/RHash#103
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.

None yet

3 participants