1. Digidoc
  2. Untitled project
  3. AncientDocumentEditor

Commits

Vincent Rabeux  committed 4db117e

Lipsum4Qt compiling on Windows 7 with VS 9.

  • Participants
  • Parent commits 5917cdd
  • Branches default

Comments (0)

Files changed (2)

File libs/Lipsum4Qt/CMakeLists.txt

View file
         GLOB_RECURSE
         Lipsum4Qt_headers
         src/*.h
+)
+
+file(
+        GLOB_RECURSE
+        Lipsum4Qt_moc_headers
         src/*.hpp
 )
 
 
 QT4_ADD_RESOURCES(RCS ${Lipsum4Qt_resources} )
 QT4_WRAP_UI(UI ${Lipsum4Qt_ui})
-QT4_WRAP_CPP(MOC ${Lipsum4Qt_headers})
+QT4_WRAP_CPP(MOC ${Lipsum4Qt_moc_headers})
 
 INCLUDE_DIRECTORIES( ${CMAKE_BINARY_DIR} )
 INCLUDE_DIRECTORIES( ./src )
 
 SET(EXTRA_LIBS  ${QT_LIBRARIES})
 
+add_definitions(-DLIPSUM4QT_LIBRARY)
 
+ADD_LIBRARY(${LIB_NAME} SHARED ${Lipsum4Qt_sources} ${MOC} ${RCS} ${UI} ${Lipsum4Qt_headers})
 
-ADD_LIBRARY(${LIB_NAME} SHARED ${Lipsum4Qt_sources}  ${MOC} ${RCS} ${UI} ${Lipsum4Qt_headers})
 IF( APPLE )
     SET_TARGET_PROPERTIES( ${LIB_NAME}
         PROPERTIES
 TARGET_LINK_LIBRARIES(${LIB_NAME} ${QT_LIBRARIES})
 
 
-
+######## INSTALLATION
 
 
 INSTALL(FILES ${Lipsum4Qt_headers} DESTINATION include/Lipsum4Qt)

File libs/Lipsum4Qt/src/Lipsum4Qt_global.h

View file
 
 #include <QtCore/qglobal.h>
 
-#if defined(LIPSUM4QT_LIBRARY)
-#  define LIPSUM4QTSHARED_EXPORT Q_DECL_EXPORT
-#else
-#  define LIPSUM4QTSHARED_EXPORT Q_DECL_IMPORT
+
+#ifdef Q_WS_WIN
+#   ifdef LIPSUM4QT_LIBRARY
+#           define LIPSUM4QTSHARED_EXPORT Q_DECL_EXPORT
+#   else
+#           define LIPSUM4QTSHARED_EXPORT Q_DECL_IMPORT
+#   endif
+#else
+#   define LIPSUM4QTSHARED_EXPORT
 #endif
 
 #endif // LIPSUM4QT_GLOBAL_H