Mercurial > hg > orthanc
changeset 1405:dae2e28951c6
fix freebsd build
author | jodogne |
---|---|
date | Mon, 01 Jun 2015 15:40:50 +0200 |
parents | 8a330b258491 |
children | d29e56f59dcf |
files | Plugins/Samples/Common/OrthancPlugins.cmake Resources/CMake/Compiler.cmake Resources/CMake/JsonCppConfiguration.cmake |
diffstat | 3 files changed, 7 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/Plugins/Samples/Common/OrthancPlugins.cmake Mon Jun 01 14:16:43 2015 +0200 +++ b/Plugins/Samples/Common/OrthancPlugins.cmake Mon Jun 01 15:40:50 2015 +0200 @@ -1,4 +1,5 @@ include(CheckLibraryExists) +include(${ORTHANC_ROOT}/Resources/CMake/Compiler.cmake) if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
--- a/Resources/CMake/Compiler.cmake Mon Jun 01 14:16:43 2015 +0200 +++ b/Resources/CMake/Compiler.cmake Mon Jun 01 15:40:50 2015 +0200 @@ -101,7 +101,7 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") # In FreeBSD, the "/usr/local/" folder contains the ports and need to be imported SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I/usr/local/include") - SET(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -I/usr/local/include -I/usr/local/include/jsoncpp") + SET(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -I/usr/local/include") SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L/usr/local/lib") SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -L/usr/local/lib") endif()
--- a/Resources/CMake/JsonCppConfiguration.cmake Mon Jun 01 14:16:43 2015 +0200 +++ b/Resources/CMake/JsonCppConfiguration.cmake Mon Jun 01 15:40:50 2015 +0200 @@ -18,11 +18,6 @@ source_group(ThirdParty\\JsonCpp REGULAR_EXPRESSION ${JSONCPP_SOURCES_DIR}/.*) else() - CHECK_INCLUDE_FILE_CXX(jsoncpp/json/reader.h HAVE_JSONCPP_H) - if (NOT HAVE_JSONCPP_H) - message(FATAL_ERROR "Please install the libjsoncpp-dev package") - endif() - find_path(JSONCPP_INCLUDE_DIR json/reader.h /usr/include/jsoncpp /usr/local/include/jsoncpp @@ -32,4 +27,9 @@ include_directories(${JSONCPP_INCLUDE_DIR}) link_libraries(jsoncpp) + CHECK_INCLUDE_FILE_CXX(${JSONCPP_INCLUDE_DIR}/json/reader.h HAVE_JSONCPP_H) + if (NOT HAVE_JSONCPP_H) + message(FATAL_ERROR "Please install the libjsoncpp-dev package") + endif() + endif()