plugins_cmake.txt 1.18 KB
Newer Older
1 2 3 4 5

QT4_WRAP_UI( PLUGIN_UIC_FILES ${PLUGIN_UI_FILES} )

QT4_WRAP_CPP( PLUGIN_MOC_FILES ${PLUGIN_QOBJECT_FILES} )

Thery Sylvain's avatar
Thery Sylvain committed
6 7 8 9
IF(APPLE)
	SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -L/usr/local/lib")
ENDIF(APPLE)

10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
IF( ${CMAKE_BUILD_TYPE} STREQUAL Debug )

	ADD_DEFINITIONS(-DDEBUG)

	IF(WIN32)
		link_directories( ${CGoGN_ROOT_DIR}/lib/Release )
	ELSE (WIN32)
		link_directories( ${CGoGN_ROOT_DIR}/lib/Debug ${CGoGN_ROOT_DIR}/lib/Release )
	ENDIF (WIN32)

	ADD_LIBRARY( ${PLUGIN_NAME}D SHARED
		${PLUGIN_FILES}
		${PLUGIN_UIC_FILES}
		${PLUGIN_MOC_FILES}
	)

	TARGET_LINK_LIBRARIES( ${PLUGIN_NAME}D
		${CGoGN_LIBS_D}
		${EXT_LIBS}
	)

	ADD_DEPENDENCIES( ${PLUGIN_NAME}D SCHNAppsD )

	SET_TARGET_PROPERTIES( ${PLUGIN_NAME}D PROPERTIES COMPILE_DEFINITIONS "DEBUG" )
		
ELSE ( ${CMAKE_BUILD_TYPE} STREQUAL Debug )
	
	IF(WIN32)
	link_directories( ${CGoGN_ROOT_DIR}/lib/Release )
	ELSE (WIN32)
		link_directories( ${CGoGN_ROOT_DIR}/lib/Release )
	ENDIF (WIN32)

	ADD_LIBRARY( ${PLUGIN_NAME} SHARED
		${PLUGIN_FILES}
		${PLUGIN_UIC_FILES}
		${PLUGIN_MOC_FILES}
	)

	TARGET_LINK_LIBRARIES( ${PLUGIN_NAME}
		${CGoGN_LIBS_R}
		${EXT_LIBS}
	)

	ADD_DEPENDENCIES( ${PLUGIN_NAME} SCHNApps )
	
ENDIF ( ${CMAKE_BUILD_TYPE} STREQUAL Debug )