don't link against X11 on OS X
authorDiane Trout <diane@caltech.edu>
Tue, 17 Oct 2006 01:33:06 +0000 (01:33 +0000)
committerDiane Trout <diane@caltech.edu>
Tue, 17 Oct 2006 01:33:06 +0000 (01:33 +0000)
the python shared library ended up picking up a link to the OS X
X11R6 libraries because it was linking against the GUI code,
if we let it link mussa will require X11 to be present on the users
system which is not always true for an OS X user.

CMakeLists.txt
alg/CMakeLists.txt
alg/test/CMakeLists.txt
py/CMakeLists.txt
qui/CMakeLists.txt

index 1cb466b6b69fb270e29c3f8748f8c755d1959f00..54468896dc75815ec1dd57c3d65919720ef572be 100644 (file)
@@ -41,7 +41,6 @@ SET(MAIN_SOURCES
 
 ADD_EXECUTABLE(mussagl WIN32 MACOSX_BUNDLE ${MAIN_SOURCES} )
 
-
 SET(PYTHON_CFLAGS "-DUSE_PYTHON")
 
 # For windows you need to go from library with the most dependencies
@@ -52,7 +51,7 @@ TARGET_LINK_LIBRARIES(mussagl
                         mussa_core
                         ${QT_LIBRARIES}
                         # Including QT_LIBS twice is for dealing with linking dependancies
-                        # related to Qt Assistant Client.
+                        # related to Qt Assistant Client on windows
                         ${QT_LIBRARIES}  
                         ${BOOST_FILESYSTEM_LIBRARY}
                         ${BOOST_SERIALIZATION_LIBRARY}
index 0d6a84cef28b8625aa40a66bd40fd9b898b673bb..e77e1d89fcf007b9028fc99343a2e047c9356364 100644 (file)
@@ -39,10 +39,6 @@ INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR}
                     ${BOOST_INCLUDE_DIR}
                     ${QT_INCLUDES})
 
-TARGET_LINK_LIBRARIES(mussa_core 
-                        ${OPEN_gl_LIBRARY}
-                        ${QT_LIBRARIES})
-
 SET_TARGET_PROPERTIES(
   mussa_core PROPERTIES
     COMPILE_FLAGS "${ALG_CFLAGS}"
index 7e5b7a89f87127a0248e08a330a390cd64839f71..607b9e9e79bdd5b7892b305c2dd171945867451b 100644 (file)
@@ -1,5 +1,7 @@
 FIND_PACKAGE(OpenGL)
 INCLUDE(FindBoost)
+FIND_PACKAGE(Qt4)
+INCLUDE( ${QT_USE_FILE} )
 INCLUDE(Platform)
 
 SET(SOURCES 
@@ -34,7 +36,8 @@ ADD_EXECUTABLE(unittest ${SOURCES})
 ADD_TEST(core_test ${CMAKE_BINARY_DIR}/alg/test/unittest)
 LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/alg})
 TARGET_LINK_LIBRARIES(unittest 
-                        mussa_core 
+                        mussa_core
+                        ${QT_LIBRARIES}
                         ${BOOST_FILESYSTEM_LIBRARY}
                         ${BOOST_UNIT_TEST_LIBRARY} 
                         ${BOOST_SERIALIZATION_LIBRARY}
index 022ef5adb21f72c06e37c050749c002da391acc8..edf988e960056bc8be071062aa2cbb55e82065fa 100644 (file)
@@ -2,9 +2,7 @@ FIND_PACKAGE(Boost)
 FIND_PACKAGE(OpenGL)
 FIND_PACKAGE(PythonLibs)
 FIND_PACKAGE(PythonInterp)
-SET(QT_USE_QTOPENGL 1)
-SET(QT_USE_QTASSISTANT 1)
-SET(QT_USE_QTNETWORK 1)
+SET(QT_DONT_USE_QTGUI 1)
 FIND_PACKAGE(Qt4)
 INCLUDE( ${QT_USE_FILE} )
 
@@ -18,7 +16,7 @@ IF(BOOST_PYTHON_LIBRARY)
         glsequence.cpp
         module.cpp 
         mussa.cpp
-        #MussaWindow.cpp
+        # MussaWindow.cpp
         nway_paths.cpp
         sequence.cpp
         )
index b6c8730992aab3cf1560063aed0b3c23c1e4bfb9..af064c7ff8142a9691257a6d4dbb76f2017e5634 100644 (file)
@@ -80,8 +80,6 @@ INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH}
                     ${BOOST_INCLUDE_DIR} )
 
 ADD_LIBRARY(mussa_qui STATIC ${SOURCES})
-TARGET_LINK_LIBRARIES(mussa_qui 
-                        mussa_core)
 
 # currently QTASSISTANT is only properly installed under windows
 IF(QT_QTASSISTANT_FOUND AND WIN32)