summaryrefslogtreecommitdiffstats
path: root/Modules/FindFLTK.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/FindFLTK.cmake')
-rw-r--r--Modules/FindFLTK.cmake13
1 files changed, 12 insertions, 1 deletions
diff --git a/Modules/FindFLTK.cmake b/Modules/FindFLTK.cmake
index bde27c4..8ad9d98 100644
--- a/Modules/FindFLTK.cmake
+++ b/Modules/FindFLTK.cmake
@@ -28,6 +28,17 @@ FIND_PATH(FLTK_INCLUDE_PATH FL/Fl.h
H:/usr/local/fltk
)
+
+# Platform dependent libraries required by FLTK
+IF(WIN32)
+ SET( FLTK_PLATFORM_DEPENDENT_LIBS wsock32 )
+ENDIF(WIN32)
+
+IF(UNIX)
+ SET( FLTK_PLATFORM_DEPENDENT_LIBS ${CMAKE_X_LIBS} -lm)
+ENDIF(UNIX)
+
+
# Make sure that the FLTK include path has been set
# So the FLTK_LIBRARY does not appear the first time
IF(FLTK_INCLUDE_PATH)
@@ -58,7 +69,7 @@ IF(FLTK_INCLUDE_PATH)
)
ENDIF(USE_FLTK_VERSION_1.1)
- SET( FLTK_LIBRARY ${FLTK_BASE_LIBRARY} ${FLTK_GL_LIBRARY} ${FLTK_FORMS_LIBRARY} ${FLTK_IMAGES_LIBRARY} )
+ SET( FLTK_LIBRARY ${FLTK_BASE_LIBRARY} ${FLTK_GL_LIBRARY} ${FLTK_FORMS_LIBRARY} ${FLTK_IMAGES_LIBRARY} ${FLTK_PLATFORM_DEPENDENT_LIBS} )
ENDIF(FLTK_INCLUDE_PATH)