diff --git a/kx_tools/CMakeLists.txt b/kx_tools/CMakeLists.txt index b46b03c..34bcd13 100644 --- a/kx_tools/CMakeLists.txt +++ b/kx_tools/CMakeLists.txt @@ -30,11 +30,8 @@ if (NOT DEFINED ENV{QNX_HOST}) qt4_add_resources(RESS ${RES}) add_executable(kx_pult ${CPPS} ${CMOCS} ${CUIS} ${RESS}) set(LIBS ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTOPENGL_LIBRARY} ${PIP_LIBRARY} qad_graphic qad_utils qad_widgets kx_utils) - if (${WIN32}) - list(APPEND LIBS opengl32 glu32) - else (${WIN32}) - list(APPEND LIBS GL GLU) - endif (${WIN32}) + find_package(OpenGL REQUIRED) + list(APPEND LIBS ${OPENGL_LIBRARIES}) target_link_libraries(kx_pult ${LIBS}) endif () diff --git a/make_libs.sh b/make_libs.sh index f8cdced..998cd15 100755 --- a/make_libs.sh +++ b/make_libs.sh @@ -2,6 +2,7 @@ #make install $@ for d in 'qad_widgets' 'qad_utils' 'qad_graphic' 'qad_sql_table' 'qad_application' 'qad_blockview' 'touch_widgets'; do cd $d + echo "now in $(pwd -P)" qmake make install $@ cd .. diff --git a/qad_graphic/CMakeLists.txt b/qad_graphic/CMakeLists.txt index db872b9..b89b70f 100644 --- a/qad_graphic/CMakeLists.txt +++ b/qad_graphic/CMakeLists.txt @@ -16,11 +16,8 @@ qt4_wrap_cpp(CMOCS ${MOCS} "uwidget.h" "uglwidget.h" OPTIONS -nw) qt4_add_resources(CRES ${RES}) add_library(qad_graphic SHARED ${CPPS} ${CUIS} ${CMOCS} ${CRES}) set(LIBS ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTOPENGL_LIBRARY} qad_widgets qad_utils) -if (${WIN32}) - list(APPEND LIBS opengl32 glu32) -else (${WIN32}) - list(APPEND LIBS GL GLU) -endif (${WIN32}) +find_package(OpenGL REQUIRED) +list(APPEND LIBS ${OPENGL_LIBRARIES}) target_link_libraries(qad_graphic ${LIBS}) if (DEFINED LIB) set(LIB 1) diff --git a/qad_utils/CMakeLists.txt b/qad_utils/CMakeLists.txt index ff91dac..8ca5729 100644 --- a/qad_utils/CMakeLists.txt +++ b/qad_utils/CMakeLists.txt @@ -20,11 +20,6 @@ qt4_wrap_cpp(CMOCS ${MOCS} OPTIONS -nw) qt4_add_resources(CRES ${RES}) add_library(qad_utils SHARED ${CPPS} ${CUIS} ${CMOCS} ${CRES}) set(LIBS ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTOPENGL_LIBRARY} qad_widgets) -if (${WIN32}) - list(APPEND LIBS opengl32 glu32) -else (${WIN32}) - list(APPEND LIBS GL GLU) -endif (${WIN32}) target_link_libraries(qad_utils ${LIBS}) if (DEFINED LIB) set(LIB 1)