Geoff McLane:
1. The variables SIMGEAR_CORE_LIBRARIES and SIMGEAR_CORE_LIBRARY_DEPENDENCIES are no longer set... hence the need to hard-code 'SimGearCore' in the target_link_libraries() 2. And -lfreetype means the linker must know the specific link path to it, while the variable FREETYPE_LIBRARIES contains the fully qualified path to the library. 3. Improved the 'found glut' message to show exactly what was found, and being used... This is due to the user possibly also have the near binary compatible glut32.lib found, which will fail in the link due to some freeglut extensions have been used. 4. Adding the define -DFREEGLUT_LIB_PRAGMAS=0 is necessary to stop the freeglut headers from using a MSVC pragma to declare the library, which will /not/ not be found... 5. In Windows the glew library is not -lGLEW, and even if it was, it would not be found, without adding a link_directories( path/to/library ), while the GLEW_LIBRARIES variable has the fully qualified path.
This commit is contained in:
parent
bb781e5e10
commit
f61293a935
2 changed files with 13 additions and 7 deletions
|
@ -16,8 +16,12 @@
|
|||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
//
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
# include <direct.h> // for getcwd()
|
||||
#else // !_WIN32
|
||||
# include <unistd.h>
|
||||
#include <dirent.h>
|
||||
#endif
|
||||
|
||||
#include "ApplicationProperties.hxx"
|
||||
|
||||
|
|
|
@ -80,19 +80,21 @@ add_executable(fgpanel
|
|||
target_link_libraries(fgpanel
|
||||
SimGearCore
|
||||
${PNG_LIBRARIES}
|
||||
${SIMGEAR_CORE_LIBRARIES}
|
||||
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
|
||||
-lfreetype
|
||||
${FREETYPE_LIBRARIES}
|
||||
)
|
||||
|
||||
if(${BCMHOST_INCLUDE_DIR} STREQUAL "BCMHOST_INCLUDE_DIR-NOTFOUND")
|
||||
find_package(GLUT REQUIRED)
|
||||
if(GLUT_FOUND)
|
||||
message(STATUS "found glut")
|
||||
message(STATUS "found GLUT inc ${GLUT_INCLUDE_DIR}, lib ${GLUT_LIBRARIES} ")
|
||||
if (MSVC)
|
||||
add_definitions( -DFREEGLUT_LIB_PRAGMAS=0 )
|
||||
endif ()
|
||||
|
||||
target_link_libraries(fgpanel
|
||||
${OPENGL_LIBRARIES}
|
||||
${GLUT_LIBRARIES}
|
||||
-lGLEW ${OPENGL_LIBRARIES}
|
||||
${GLEW_LIBRARIES}
|
||||
)
|
||||
else(GLUT_FOUND)
|
||||
message(STATUS "glut NOT found, can't build fgpanel")
|
||||
|
|
Loading…
Reference in a new issue