Skip to content

Commit

Permalink
native/CMakeLists.txt cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Oct 30, 2018
1 parent 0d7f598 commit 629cdf2
Showing 1 changed file with 24 additions and 33 deletions.
57 changes: 24 additions & 33 deletions src/native/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
SET(NATIVE_LINK_LIBS)

IF(UNIX AND NOT APPLE AND NOT ANDROID)
FIND_PACKAGE(Qt5DBus REQUIRED)
FIND_PACKAGE(Qt5DBus REQUIRED)
ENDIF(UNIX AND NOT APPLE AND NOT ANDROID)

IF(APPLE)
Expand Down Expand Up @@ -36,7 +36,11 @@ SET(QGIS_NATIVE_SRCS
qgsnative.cpp
)

SET (QGIS_NATIVE_MOC_HDRS
SET(QGIS_NATIVE_MOC_HDRS
qgsnative.h
)

SET(QGIS_NATIVE_HDRS
qgsnative.h
)

Expand All @@ -51,57 +55,44 @@ IF(APPLE)
SET(QGIS_NATIVE_SRCS ${QGIS_NATIVE_SRCS}
${QGIS_APP_OBJC_SRCS}
)
SET (QGIS_NATIVE_MOC_HDRS
${QGIS_NATIVE_MOC_HDRS}
mac/qgsmacnative.h
)
SET (QGIS_NATIVE_HDRS ${QGIS_NATIVE_HDRS}
mac/qgsmacnative.h
mac/cocoainitializer.h
)
ENDIF(APPLE)

IF(MSVC)
SET(QGIS_APP_WIN32_SRCS
SET(QGIS_NATIVE_SRCS ${QGIS_NATIVE_SRCS}
../../external/wintoast/src/wintoastlib.cpp
win/qgswinnative.cpp
)
SET (QGIS_NATIVE_MOC_HDRS
${QGIS_NATIVE_MOC_HDRS}
win/qgswinnative.h
)
SET(QGIS_NATIVE_SRCS ${QGIS_NATIVE_SRCS}
${QGIS_APP_WIN32_SRCS}
SET (QGIS_NATIVE_HDRS ${QGIS_NATIVE_HDRS}
win/qgswinnative.h
)
ENDIF(MSVC)

IF(UNIX AND NOT APPLE AND NOT ANDROID)
SET(QGIS_APP_LINUX_SRCS
linux/qgslinuxnative.cpp
)
SET(QGIS_NATIVE_SRCS ${QGIS_NATIVE_SRCS}
${QGIS_APP_LINUX_SRCS}
)
ENDIF(UNIX AND NOT APPLE AND NOT ANDROID)

SET(QGIS_NATIVE_HDRS
qgsnative.h
)

QT5_WRAP_CPP(QGIS_NATIVE_MOC_SRCS ${QGIS_NATIVE_MOC_HDRS})

# install headers

IF(APPLE)
SET (QGIS_NATIVE_HDRS ${QGIS_NATIVE_HDRS}
mac/qgsmacnative.h
mac/cocoainitializer.h
linux/qgslinuxnative.cpp
)
ENDIF(APPLE)

IF(MSVC)
SET (QGIS_NATIVE_HDRS ${QGIS_NATIVE_HDRS}
win/qgswinnative.h
SET (QGIS_NATIVE_MOC_HDRS
${QGIS_NATIVE_MOC_HDRS}
linux/qgslinuxnative.h
)
ENDIF(MSVC)

IF(UNIX)
SET (QGIS_NATIVE_HDRS ${QGIS_NATIVE_HDRS}
linux/qgslinuxnative.h
)
ENDIF(UNIX)
ENDIF(UNIX AND NOT APPLE AND NOT ANDROID)

QT5_WRAP_CPP(QGIS_NATIVE_MOC_SRCS ${QGIS_NATIVE_MOC_HDRS})

INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR}
Expand Down

0 comments on commit 629cdf2

Please sign in to comment.