diff --git a/.travis.yml b/.travis.yml index 9779c6d0a4..e206bc15f9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -436,7 +436,7 @@ jobs: # create build directory - mkdir build && cd build # configure Tulip complete build using cmake - - cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/install -DPYTHON_EXECUTABLE=/usr/bin/python2.7 -DTULIP_BUILD_TESTS=ON -DTULIP_USE_CCACHE=ON -DZLIB_INCLUDE_DIR=/opt/local/include -DZLIB_LIBRARY_RELEASE=/opt/local/lib/libz.dylib -DPNG_INCLUDE_DIR=/opt/local/include -DPNG_LIBRARY_RELEASE=/opt/local/lib/libpng.dylib -DJPEG_INCLUDE_DIR=/opt/local/include -DJPEG_LIBRARY=/opt/local/lib/libjpeg.dylib || travis_terminate 1 + - cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/install -DPYTHON_EXECUTABLE=/usr/bin/python2.7 -DTULIP_BUILD_TESTS=ON -DTULIP_USE_CCACHE=ON -DZLIB_INCLUDE_DIR=/opt/local/include -DZLIB_LIBRARY_RELEASE=/opt/local/lib/libz.dylib -DPNG_INCLUDE_DIR=/opt/local/include -DPNG_LIBRARY_RELEASE=/opt/local/lib/libpng.dylib -DJPEG_INCLUDE_DIR=/opt/local/include -DJPEG_LIBRARY=/opt/local/lib/libjpeg.dylib -DGLEW_SHARED_LIBRARY_RELEASE=/opt/local/lib/libGLEW.dylib || travis_terminate 1 # compile Tulip using ninja for faster builds - ninja -j4 || travis_terminate 1 - ninja -j4 install || travis_terminate 1 @@ -488,7 +488,7 @@ jobs: # create build directory - mkdir build && cd build # configure Tulip complete build using cmake - - cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/install -DCMAKE_C_COMPILER=/opt/local/bin/clang-mp-8.0 -DCMAKE_CXX_COMPILER=/opt/local/bin/clang++-mp-8.0 -DPYTHON_EXECUTABLE=/usr/bin/python2.7 -DTULIP_BUILD_TESTS=ON -DTULIP_USE_CCACHE=ON -DZLIB_INCLUDE_DIR=/opt/local/include -DZLIB_LIBRARY_RELEASE=/opt/local/lib/libz.dylib -DPNG_INCLUDE_DIR=/opt/local/include -DPNG_LIBRARY_RELEASE=/opt/local/lib/libpng.dylib -DJPEG_INCLUDE_DIR=/opt/local/include -DJPEG_LIBRARY=/opt/local/lib/libjpeg.dylib + - cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/install -DCMAKE_C_COMPILER=/opt/local/bin/clang-mp-8.0 -DCMAKE_CXX_COMPILER=/opt/local/bin/clang++-mp-8.0 -DPYTHON_EXECUTABLE=/usr/bin/python2.7 -DTULIP_BUILD_TESTS=ON -DTULIP_USE_CCACHE=ON -DZLIB_INCLUDE_DIR=/opt/local/include -DZLIB_LIBRARY_RELEASE=/opt/local/lib/libz.dylib -DPNG_INCLUDE_DIR=/opt/local/include -DPNG_LIBRARY_RELEASE=/opt/local/lib/libpng.dylib -DJPEG_INCLUDE_DIR=/opt/local/include -DJPEG_LIBRARY=/opt/local/lib/libjpeg.dylib -DGLEW_SHARED_LIBRARY_RELEASE=/opt/local/lib/libGLEW.dylib # compile Tulip using ninja for faster builds - ninja -j4 - ninja -j4 install diff --git a/CMakeLists.txt b/CMakeLists.txt index e24ff47e65..23ea1cfa94 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -308,10 +308,14 @@ IF(NOT TULIP_BUILD_CORE_ONLY) # Glew FIND_PACKAGE(GLEW REQUIRED) # if needed, when using cmake 3.15, define some undefined glew variables - IF(NOT ${CMAKE_VERSION} VERSION_LESS "3.15.0" AND NOT GLEW_INCLUDE_DIR) - GET_TARGET_PROPERTY(GLEW_INCLUDE_DIR GLEW::GLEW INTERFACE_INCLUDE_DIRECTORIES) - SET(GLEW_LIBRARY GLEW::GLEW) - ENDIF(NOT ${CMAKE_VERSION} VERSION_LESS "3.15.0" AND NOT GLEW_INCLUDE_DIR) + IF(NOT ${CMAKE_VERSION} VERSION_LESS "3.15.0") + IF(NOT GLEW_INCLUDE_DIR) + GET_TARGET_PROPERTY(GLEW_INCLUDE_DIR GLEW::GLEW INTERFACE_INCLUDE_DIRECTORIES) + ENDIF(NOT GLEW_INCLUDE_DIR) + IF(NOT GLEW_LIBRARY) + SET(GLEW_LIBRARY GLEW::GLEW) + ENDIF(NOT GLEW_LIBRARY) + ENDIF(NOT ${CMAKE_VERSION} VERSION_LESS "3.15.0") # Jpeg FIND_PACKAGE(JPEG REQUIRED)