Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

Commit

Permalink
Search for jansson using the cmake module. RITDEV-277
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulVanSchayck committed Feb 28, 2019
1 parent 6e1a6f6 commit 16c3f5e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 7 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,27 @@
#
# irods-externals-clang-runtime3.8-0
# irods-externals-clang3.8-0
# irods-externals

# Specify the minimum version for CMake
cmake_minimum_required(VERSION 3.5.0 FATAL_ERROR)

# Set global CMAKE variables
# TODO: Determine what is the preferred way of doing this: setting the values here vs. using ENV vars vs. providing them with the -D flag in cmake call
# Note: Some of the include dirs (like CURL) can automatically be found by CMake at the 'include_directories' step and do not have to be set here.
# See https://cmake.org/cmake/help/v3.0/module/FindCURL.html
set(MSI_RELEASE_VERSION "1.1.0")

set(IRODS_VERSION $ENV{IRODS_VERSION}) # Get iRODS version from environment
#set(IRODS_VERSION "4.2.4") # Or specificy iRODS version manually

set(IRODS_EXTERNALS_FULLPATH_CLANG /opt/irods-externals/clang3.8-0)

# Set additional modules
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/CMakeModules")

# Set some paths for dependencies from irods-externals
set(BOOST_ROOT "/opt/irods-externals/boost1.60.0-0")
set(JANSSON_INCLUDE_DIRS /opt/irods-externals/jansson2.7-0/include/)
set(JANSSON_LIBRARIES /opt/irods-externals/jansson2.7-0/lib/)
set(IRODS_EXTERNALS_FULLPATH_CLANG /opt/irods-externals/clang3.8-0)
set(JANSSON_ROOT /opt/irods-externals/jansson2.7-0)

# Set compiler options
# TODO: Understand what this does and why this is needed. I just copied this from UU to make it work
Expand All @@ -44,7 +47,6 @@ add_compile_options(-std=c++14
-Wno-unused-parameter)

# Use shared libraries in this project
# TODO: Understand what this does and why this is needed. I just copied this from UU to make it work
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -stdlib=libc++")
link_libraries(c++abi)

Expand Down
2 changes: 2 additions & 0 deletions CMakeModules/FindJansson.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ else (JANSSON_LIBRARIES AND JANSSON_INCLUDE_DIRS)
NAMES
jansson.h
PATHS
${JANSSON_ROOT}/include
/usr/include
/usr/local/include
/opt/local/include
Expand All @@ -30,6 +31,7 @@ find_library(JANSSON_LIBRARY
NAMES
jansson
PATHS
${JANSSON_ROOT}/lib
/usr/lib
/usr/local/lib
/opt/local/lib
Expand Down

0 comments on commit 16c3f5e

Please sign in to comment.