Commits

opampg committed 9b71677

src/CMakeLists.txtを記述

Comments (0)

Files changed (2)

src/CMakeLists.txt

+SET(SRC_DIR ${PROJECT_SOURCE_DIR}/src)
+SET(TEST_DIR ${PROJECT_SOURCE_DIR}/src/test)
+SET(RESOURCES_DIR ${PROJECT_SOURCE_DIR}/src/resources)
+
+SET(MSRC)
+
+SET(MHED)
+
+QT4_WRAP_CPP(HMOD ${MHED})
+QT4_ADD_RESOURCES(QRC ${SRC_DIR}/main.qrc)
+ADD_DEFINITIONS(${QT_DEFINITIONS})
+INCLUDE(${QT_USE_FILE})
+
+SET(SRCS ${MSRC} ${HMOD} ${QRC})
+
+SET(EXECUTABLE_FILE_NAME "WebPViewer") # Generated executable file name.
+IF(WIN32)
+#	SET(SRCS ${SRCS} ${RESOURCES_DIR}/icons/win/icon.rc)
+	ADD_EXECUTABLE(${EXECUTABLE_FILE_NAME}r WIN32 ${SRCS})
+ELSEIF(APPLE)
+#	SET(SRCS ${SRCS} {RESOURCES_DIR}/icons/mac/icon.icns)
+#	SET(MACOSX_BUNDLE_ICON_FILE ${RESOURCES_DIR}/icons/mac/icon.icns)
+#	SET_SOURCE_FILES_PROPERTIES(icon.icns PROPERTIES 
+#			MACOSX_PACKAGE_LOCATION Resources)
+	ADD_EXECUTABLE(${EXECUTABLE_FILE_NAME} MACOSX_BUNDLE ${SRCS})
+ELSEIF(UNIX AND NOT APPLE)
+	ADD_EXECUTABLE(${EXECUTABLE_FILE_NAME} ${SRCS})
+ENDIF()
+TARGET_LINK_LIBRARIES(${EXECUTABLE_FILE_NAME} ${QT_LIBRARIES}) # Link 
+
+IF(UNIX AND NOT APPLE)
+	INSTALL(TARGETS ${EXECUTABLE_FILE_NAME} RUNTIME DESTINATION bin)
+ENDIF(UNIX AND NOT APPLE)

src/test/CMakeLists.txt

Empty file added.