Commit a317ea8e authored by Sylvain Thery's avatar Sylvain Thery

Apps compilation on windows

parent 27f5e30d
# How make separated applications
# #
# usage: insert line: # usage: insert this line in your CMakeLists.txt
# include(${CGoGN_ROOT_DIR}/build/apps_cmake.txt) # include(${CGoGN_ROOT_DIR}/build/apps_cmake.txt)
# just after defining CGoGN_ROOT_DIR # just after defining CGoGN_ROOT_DIR
# #
...@@ -8,12 +9,12 @@ ...@@ -8,12 +9,12 @@
# cmake_minimum_required(VERSION 2.8) # cmake_minimum_required(VERSION 2.8)
# project(Pipo) # project(Pipo)
# #
# set(QT_USE_QTCORE TRUE) # set(QT_USE_QTCORE TRUE) # for Qt
# set(QT_USE_QTOPENGL TRUE) # set(QT_USE_QTOPENGL TRUE) # for Qt & OpenGL (!!)
# set(QT_USE_QTXML TRUE) # for QGLViewer
# find_package(Qt REQUIRED) # find_package(Qt REQUIRED)
# include(${QT_USE_FILE}) # include(${QT_USE_FILE})
# #
# set(CMAKE_BUILD_TYPE Release CACHE STRING "Release or Debug")
# set(CGoGN_ROOT_DIR ${CMAKE_SOURCE_DIR}/../../CGoGN CACHE STRING "CGoGN root dir") # set(CGoGN_ROOT_DIR ${CMAKE_SOURCE_DIR}/../../CGoGN CACHE STRING "CGoGN root dir")
# include(${CGoGN_ROOT_DIR}/apps_cmake.txt) # include(${CGoGN_ROOT_DIR}/apps_cmake.txt)
# #
...@@ -23,12 +24,14 @@ ...@@ -23,12 +24,14 @@
# add_executable( pipo pipo.cpp ${pipo_ui} ${pipo_moc} ) # add_executable( pipo pipo.cpp ${pipo_ui} ${pipo_moc} )
# target_link_libraries( pipo ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} ) # target_link_libraries( pipo ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
# #
#
# WARNING: to avoid problem of DLL loading, on windows executable are generated in CGoGN/bin/....
# Take care while choosing executable names
#
SET ( CGoGN_SRC_DIR ${CGoGN_ROOT_DIR}/CGoGN) SET ( CGoGN_SRC_DIR ${CGoGN_ROOT_DIR}/CGoGN)
SET ( CMAKE_MODULE_PATH ${CGoGN_ROOT_DIR}/cmake_modules/ ) SET ( CMAKE_MODULE_PATH ${CGoGN_ROOT_DIR}/cmake_modules/ )
INCLUDE(${CGoGN_ROOT_DIR}/cmake_modules/functions.cmake) INCLUDE(${CGoGN_ROOT_DIR}/cmake_modules/functions.cmake)
checkCpp11Support() checkCpp11Support()
...@@ -56,19 +59,26 @@ IF(NOT WIN32) ...@@ -56,19 +59,26 @@ IF(NOT WIN32)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-local-typedefs") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-local-typedefs")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-local-typedefs") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-local-typedefs")
ENDIF() ENDIF()
if(APPLE) IF(APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated -Wno-overloaded-virtual") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated -Wno-overloaded-virtual")
endif() ENDIF()
ENDIF() ENDIF()
IF(WIN32 AND (NOT CGoGN_WITH_QTCREATOR)) IF (WIN32)
link_directories( ${CGoGN_ROOT_DIR}/lib/${ConfigurationName} ${Boost_LIBRARY_DIRS}) link_directories( ${CGoGN_ROOT_DIR}/windows_dependencies/lib/)
SET(EXECUTABLE_OUTPUT_PATH ${CGoGN_ROOT_DIR}/bin/) # Release/Debug added automatically by visual IF((CGoGN_WITH_QTCREATOR))
ELSE () link_directories( ${CGoGN_ROOT_DIR}/bin/${CMAKE_BUILD_TYPE})
link_directories( ${CGoGN_ROOT_DIR}/lib/${CMAKE_BUILD_TYPE}) SET(EXECUTABLE_OUTPUT_PATH ${CGoGN_ROOT_DIR}/bin/${CMAKE_BUILD_TYPE}) # Release/Debug added automatically by visual
SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin/${CMAKE_BUILD_TYPE}) ELSE()
ENDIF () link_directories( ${CGoGN_ROOT_DIR}/bin/${ConfigurationName})
message(STATUS ${CGoGN_ROOT_DIR}/bin/${ConfigurationName} )
SET(EXECUTABLE_OUTPUT_PATH ${CGoGN_ROOT_DIR}/bin/) # Release/Debug added automatically by visual
ENDIF()
ELSE()
link_directories( ${CGoGN_ROOT_DIR}/lib/${CMAKE_BUILD_TYPE} )
SET(EXECUTABLE_OUTPUT_PATH ${CGoGN_ROOT_DIR}/bin/${CMAKE_BUILD_TYPE} )
ENDIF()
...@@ -96,7 +106,6 @@ include_directories( ...@@ -96,7 +106,6 @@ include_directories(
${CGoGN_EXT_INCLUDES}) ${CGoGN_EXT_INCLUDES})
#for compatibility #for compatibility
SET (COMMON_INCLUDES ${CGoGN_EXT_INCLUDES}) SET (COMMON_INCLUDES ${CGoGN_EXT_INCLUDES})
SET (COMMON_LIBS ${CGoGN_EXT_LIBS}) SET (COMMON_LIBS ${CGoGN_EXT_LIBS})
......
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