Commit c2c2eb24 authored by Johnny Jazeix's avatar Johnny Jazeix

fix cmake/cpack + add windows build

parent c833bc08
......@@ -176,6 +176,7 @@ endif(VITE_ENABLE_SERIALIZATION)
if(VITE_ENABLE_VBO)
find_package(GLEW REQUIRED)
include_directories(${GLEW_INCLUDE_PATH})
if (GLM_INC)
include_directories(${GLM_INC})
list(APPEND CMAKE_REQUIRED_INCLUDES ${GLM_INC})
......
......@@ -8,7 +8,35 @@ set(CPACK_SOURCE_GENERATOR "TBZ2")
set(CPACK_SOURCE_PACKAGE_FILE_NAME
"${CMAKE_PROJECT_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
SET(CPACK_SOURCE_IGNORE_FILES
if(WIN32)
set(CPACK_NSIS_EXECUTABLES_DIRECTORY "bin")
set(CPACK_PACKAGE_EXECUTABLES "vite" "ViTE")
install(FILES ${GLEW_DLL} DESTINATION bin)
install(FILES ${ZLIB_DLL} DESTINATION bin)
# install Qt dlls
set(QT_DLL_PATH ${Qt5Core_DIR}/../../../bin)
get_target_property(QtCoreDll Qt5::Core "IMPORTED_LOCATION_RELEASE")
get_target_property(QtGuiDll Qt5::Gui "IMPORTED_LOCATION_RELEASE")
get_target_property(QtOpenGLDll Qt5::OpenGL "IMPORTED_LOCATION_RELEASE")
get_target_property(QtWidgetsDll Qt5::Widgets "IMPORTED_LOCATION_RELEASE")
get_target_property(QtXmlDll Qt5::Xml "IMPORTED_LOCATION_RELEASE")
install(FILES ${QtCoreDll} ${QtGuiDll} ${QtOpenGLDll} ${QtWidgetsDll} ${QtXmlDll}
DESTINATION bin)
install(FILES ${QT_DLL_PATH}/../plugins/platforms/qwindows.dll
DESTINATION bin/platforms)
install(FILES ${QT_DLL_PATH}/libgcc_s_dw2-1.dll ${QT_DLL_PATH}/libwinpthread-1.dll ${QT_DLL_PATH}/libstdc++-6.dll ${QT_DLL_PATH}/icudt54.dll ${QT_DLL_PATH}/icuin54.dll ${QT_DLL_PATH}/icuuc54.dll
DESTINATION bin)
endif(WIN32)
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "ViTE is a trace explorer. It is a tool to visualize execution traces in Pajé or OTF format for debugging and profiling parallel or distributed applications.")
set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/licence/Licence_CeCILL_V2-en.txt")
set(CPACK_RESOURCE_FILE_README "${PROJECT_SOURCE_DIR}/README")
set(CPACK_SOURCE_IGNORE_FILES
/\\\\.svn/
~$
CMakeCache\\\\.txt
......
......@@ -418,6 +418,13 @@ IF( VITE_ENABLE_OTF )
LINK_DIRECTORIES( ${OTF_LIBRARY_DIR} )
ENDIF( VITE_ENABLE_OTF )
#resource
IF(WIN32)
set(VITE_RES
"${PROJECT_SOURCE_DIR}/src/interface/icon/logo.ico"
"${PROJECT_SOURCE_DIR}/src/interface/windows_icon.rc"
)
ENDIF(WIN32)
if( APPLE )
INCLUDE_DIRECTORIES(/usr/X11/include)
......@@ -434,7 +441,7 @@ if( APPLE )
MACOSX_BUNDLE_COPYRIGHT "INRIA 2006-2012"
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/vite-info.plist.in)
else( APPLE )
ADD_EXECUTABLE(vite ${VITE_SRCS} ${VITE_MOC} ${VITE_RCC_SRCS})
ADD_EXECUTABLE(vite ${VITE_SRCS} ${VITE_MOC} ${VITE_RCC_SRCS} ${VITE_RES})
endif( APPLE )
#############################################
......@@ -468,6 +475,12 @@ IF(VITE_ENABLE_OTF)
TARGET_LINK_LIBRARIES(vite
${OTF_LIBRARY}
)
# if OTF is compiled with zlib support we need to add it
IF(WIN32)
TARGET_LINK_LIBRARIES(vite
${ZLIB_LIBRARY}
)
ENDIF(WIN32)
ENDIF(VITE_ENABLE_OTF)
IF(VITE_ENABLE_TAU)
......@@ -476,4 +489,9 @@ IF(VITE_ENABLE_TAU)
)
ENDIF(VITE_ENABLE_TAU)
IF(WIN32)
# Remove the console for windows
set_target_properties(vite PROPERTIES LINK_FLAGS -Wl,-subsystem,windows)
ENDIF(WIN32)
INSTALL_TARGETS(/bin vite)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment