diff --git a/CMakeLists.txt b/CMakeLists.txt index b6be348f9..e55a33c84 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,7 +69,9 @@ set( HAVE_LIBOPENJPEG 0 ) if( GRIB_API_JPG ) + ecbuild_add_extra_search_paths( jasper ) # help standard cmake macro with ecmwf paths find_package( Jasper ) + find_package( OpenJPEG ) if( JASPER_FOUND ) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 5256b8d61..204dde45d 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -1,6 +1,6 @@ if( GRIB_API_PYTHON ) - ecbuild_find_python( VERSION 2.5 ) + ecbuild_find_python( VERSION 2.5) find_package( SWIG ) if( SWIG_FOUND ) @@ -53,7 +53,7 @@ if( GRIB_API_PYTHON ) set( LIB_OPENJPEG ${HAVE_LIBOPENJPEG} ) get_filename_component(OPENJPEG_DIR ${OPENJPEG_INCLUDE_DIR} PATH ) - include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ) + include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${PYTHON_INCLUDE_DIRS} ) configure_file( setup.py.in setup.py )