diff --git a/CMakeModules/oe_unix.cmake b/CMakeModules/oe_unix.cmake index b464c12a46..2acbca2525 100644 --- a/CMakeModules/oe_unix.cmake +++ b/CMakeModules/oe_unix.cmake @@ -3,12 +3,9 @@ IF(UNIX AND NOT ANDROID) # Not sure what this will do on Cygwin and Msys # Also, remember OS X X11 is a user installed option so it may not exist. - find_library(X11) - + FIND_PACKAGE(X11) # Some Unicies need explicit linkage to the Math library or the build fails. - find_library(MATH_LIBRARY m) - - # for pthreads - find_library(Threads) - + FIND_LIBRARY(MATH_LIBRARY m) + # for ptheads in linux + find_package(Threads REQUIRED) ENDIF(UNIX AND NOT ANDROID) diff --git a/src/applications/osgearth_features/osgearth_features.cpp b/src/applications/osgearth_features/osgearth_features.cpp index 81b88c49e2..8f88daa9af 100644 --- a/src/applications/osgearth_features/osgearth_features.cpp +++ b/src/applications/osgearth_features/osgearth_features.cpp @@ -41,7 +41,7 @@ using namespace osgEarth::Util; int usage( const std::string& app ) { - OE_NOTICE "\n" << app << "\n" + OE_NOTICE << "\n" << app << "\n" << " --rasterize : draw features as rasterized image tiles \n" << " --drape : draw features as projected texture \n" << " --clamp : draw features using shader clamping \n" diff --git a/src/osgEarth/CMakeLists.txt b/src/osgEarth/CMakeLists.txt index 0f8726059c..224a37573c 100644 --- a/src/osgEarth/CMakeLists.txt +++ b/src/osgEarth/CMakeLists.txt @@ -980,6 +980,10 @@ IF (TRACY_FOUND) LINK_WITH_VARIABLES(${LIB_NAME} TRACY_LIBRARY) ENDIF(TRACY_FOUND) +if(UNIX) + target_link_libraries(${LIB_NAME} PUBLIC Threads::Threads) +endif() + OPTION(NRL_STATIC_LIBRARIES "Link osgEarth against static GDAL and cURL, including static OpenSSL, Proj4, JPEG, PNG, and TIFF." OFF) if(NOT NRL_STATIC_LIBRARIES) LINK_WITH_VARIABLES(${LIB_NAME} OSG_LIBRARY OSGUTIL_LIBRARY OSGSIM_LIBRARY OSGDB_LIBRARY OSGVIEWER_LIBRARY OSGTEXT_LIBRARY OSGGA_LIBRARY OSGSHADOW_LIBRARY CURL_LIBRARY GDAL_LIBRARY OSGMANIPULATOR_LIBRARY)