Skip to content
Permalink
Browse files

only install 'copy OS X content' on OS X

  • Loading branch information
jef-n committed Aug 8, 2012
1 parent 928da6e commit af502953996f40c1442e6aed65b0bc5f7fcf7d66
Showing with 45 additions and 33 deletions.
  1. +12 −9 src/analysis/CMakeLists.txt
  2. +11 −8 src/analysis/network/CMakeLists.txt
  3. +11 −8 src/core/CMakeLists.txt
  4. +11 −8 src/gui/CMakeLists.txt
@@ -102,15 +102,18 @@ ENDIF (WIN32)

ADD_LIBRARY(qgis_analysis SHARED ${QGIS_ANALYSIS_SRCS} ${QGIS_ANALYSIS_MOC_SRCS} ${QGIS_ANALYSIS_HDRS})

SET_TARGET_PROPERTIES(qgis_analysis PROPERTIES
# no moc headers, messes up PROPERTIES syntax
PUBLIC_HEADER "${QGIS_ANALYSIS_HDRS}"
CLEAN_DIRECT_OUTPUT 1
FRAMEWORK 1
FRAMEWORK_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}"
MACOSX_FRAMEWORK_INFO_PLIST "${CMAKE_SOURCE_DIR}/mac/framework.info.plist.in"
MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${COMPLETE_VERSION}
MACOSX_FRAMEWORK_IDENTIFIER org.qgis.qgis_analysis)
IF(APPLE)
SET_TARGET_PROPERTIES(qgis_analysis PROPERTIES
# no moc headers, messes up PROPERTIES syntax
PUBLIC_HEADER "${QGIS_ANALYSIS_HDRS}"
CLEAN_DIRECT_OUTPUT 1
FRAMEWORK 1
FRAMEWORK_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}"
MACOSX_FRAMEWORK_INFO_PLIST "${CMAKE_SOURCE_DIR}/mac/framework.info.plist.in"
MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${COMPLETE_VERSION}
MACOSX_FRAMEWORK_IDENTIFIER org.qgis.qgis_analysis
)
ENDIF(APPLE)

#generate unversioned libs for android
IF (NOT ANDROID)
@@ -44,14 +44,17 @@ INCLUDE_DIRECTORIES(

ADD_LIBRARY(qgis_networkanalysis SHARED ${QGIS_NETWORK_ANALYSIS_SRCS} ${QGIS_NETWORK_ANALYSIS_MOC_SRCS} ${QGIS_NETWORK_ANALYSIS_HDRS})

SET_TARGET_PROPERTIES(qgis_networkanalysis PROPERTIES
PUBLIC_HEADER "${QGIS_NETWORK_ANALYSIS_HDRS};${QGIS_NETWORK_ANALYSIS_MOC_HDRS}"
CLEAN_DIRECT_OUTPUT 1
FRAMEWORK 1
FRAMEWORK_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}"
MACOSX_FRAMEWORK_INFO_PLIST "${CMAKE_SOURCE_DIR}/mac/framework.info.plist.in"
MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${COMPLETE_VERSION}
MACOSX_FRAMEWORK_IDENTIFIER org.qgis.qgis_networkanalysis)
IF(APPLE)
SET_TARGET_PROPERTIES(qgis_networkanalysis PROPERTIES
PUBLIC_HEADER "${QGIS_NETWORK_ANALYSIS_HDRS};${QGIS_NETWORK_ANALYSIS_MOC_HDRS}"
CLEAN_DIRECT_OUTPUT 1
FRAMEWORK 1
FRAMEWORK_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}"
MACOSX_FRAMEWORK_INFO_PLIST "${CMAKE_SOURCE_DIR}/mac/framework.info.plist.in"
MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${COMPLETE_VERSION}
MACOSX_FRAMEWORK_IDENTIFIER org.qgis.qgis_networkanalysis
)
ENDIF(APPLE)

#generate unversioned libs for android
IF (NOT ANDROID)
@@ -492,14 +492,17 @@ ENDIF (WIN32)

ADD_LIBRARY(qgis_core SHARED ${QGIS_CORE_SRCS} ${QGIS_CORE_MOC_SRCS} ${QGIS_CORE_HDRS} ${QGIS_CORE_MOC_HDRS})

SET_TARGET_PROPERTIES(qgis_core PROPERTIES
PUBLIC_HEADER "${QGIS_CORE_HDRS};${QGIS_CORE_MOC_HDRS}"
CLEAN_DIRECT_OUTPUT 1
FRAMEWORK 1
FRAMEWORK_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}"
MACOSX_FRAMEWORK_INFO_PLIST "${CMAKE_SOURCE_DIR}/mac/framework.info.plist.in"
MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${COMPLETE_VERSION}
MACOSX_FRAMEWORK_IDENTIFIER org.qgis.qgis_core)
IF(APPLE)
SET_TARGET_PROPERTIES(qgis_core PROPERTIES
PUBLIC_HEADER "${QGIS_CORE_HDRS};${QGIS_CORE_MOC_HDRS}"
CLEAN_DIRECT_OUTPUT 1
FRAMEWORK 1
FRAMEWORK_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}"
MACOSX_FRAMEWORK_INFO_PLIST "${CMAKE_SOURCE_DIR}/mac/framework.info.plist.in"
MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${COMPLETE_VERSION}
MACOSX_FRAMEWORK_IDENTIFIER org.qgis.qgis_core
)
ENDIF(APPLE)

#generate unversioned libs for android
IF (NOT ANDROID)
@@ -306,14 +306,17 @@ ADD_LIBRARY(qgis_gui SHARED
#${MODELTEST_SRCS} ${MODELTEST_MOC_SRCS} # for ModelTest
)

SET_TARGET_PROPERTIES(qgis_gui PROPERTIES
PUBLIC_HEADER "${QGIS_GUI_HDRS};${QGIS_GUI_MOC_HDRS}"
CLEAN_DIRECT_OUTPUT 1
FRAMEWORK 1
FRAMEWORK_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}"
MACOSX_FRAMEWORK_INFO_PLIST "${CMAKE_SOURCE_DIR}/mac/framework.info.plist.in"
MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${COMPLETE_VERSION}
MACOSX_FRAMEWORK_IDENTIFIER org.qgis.qgis_gui)
IF(APPLE)
SET_TARGET_PROPERTIES(qgis_gui PROPERTIES
PUBLIC_HEADER "${QGIS_GUI_HDRS};${QGIS_GUI_MOC_HDRS}"
CLEAN_DIRECT_OUTPUT 1
FRAMEWORK 1
FRAMEWORK_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}"
MACOSX_FRAMEWORK_INFO_PLIST "${CMAKE_SOURCE_DIR}/mac/framework.info.plist.in"
MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${COMPLETE_VERSION}
MACOSX_FRAMEWORK_IDENTIFIER org.qgis.qgis_gui
)
ENDIF(APPLE)

#generate unversioned libs for android
IF (NOT ANDROID)

2 comments on commit af50295

@kyngchaos

This comment has been minimized.

Copy link
Contributor

@kyngchaos kyngchaos replied Aug 8, 2012

A big part of my cmake cleanup a while back was to simplify. The target properties for specific platforms don't need to be wrapped in an IF block, they are ignored on other platforms.

Also, I made the install targets install the headers with the PUBLIC_HEADER property, instead of the manual install done previously. If you remove this property to only OS X, then headers won't be installed on other platforms.

@jef-n

This comment has been minimized.

Copy link
Member Author

@jef-n jef-n replied Aug 8, 2012

should be fixed in 55628dd

Please sign in to comment.
You can’t perform that action at this time.