mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-20 03:49:31 -06:00
Added release/debug support for mac/linux version
This commit is contained in:
@@ -35,6 +35,13 @@ set(OPENSPACE_EXT_DIR "${OPENSPACE_BASE_DIR}/ext")
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${OPENSPACE_EXT_DIR})
|
||||
|
||||
# Make sure abuild type is set. Default is Debug.
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set( CMAKE_BUILD_TYPE Debug CACHE STRING
|
||||
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
|
||||
FORCE )
|
||||
endif(NOT CMAKE_BUILD_TYPE)
|
||||
|
||||
if (APPLE )
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++")
|
||||
endif ()
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
|
||||
# Find the library
|
||||
if(WIN32)
|
||||
|
||||
@@ -35,6 +34,7 @@ if(WIN32)
|
||||
"${SGCT_WINDOWS_PATHS}"
|
||||
)
|
||||
|
||||
# Find the sgct library
|
||||
set(SGCT_LIBRARY
|
||||
"ws2_32.lib"
|
||||
optimized "${SGCT_ROOT_DIR}/lib/msvc11_x64/sgct.lib"
|
||||
@@ -53,12 +53,19 @@ else()
|
||||
message(FATAL_ERROR "Could not locate SGCT!")
|
||||
endif(NOT SGCT_ROOT_DIR)
|
||||
|
||||
# OS X has cpp11 support
|
||||
if (APPLE)
|
||||
set(SGCT_NAME "sgct_cpp11")
|
||||
else(APPLE)
|
||||
set(SGCT_NAME "sgct")
|
||||
endif(APPLE)
|
||||
|
||||
# check if debug or release version of sgct should be used
|
||||
if(CMAKE_BUILD_TYPE MATCHES DEBUG)
|
||||
set(SGCT_NAME "${SGCT_NAME}d")
|
||||
endif(CMAKE_BUILD_TYPE MATCHES DEBUG)
|
||||
|
||||
# Find the sgct library
|
||||
find_library(SGCT_LIBRARY NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}${SGCT_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
HINTS "${SGCT_ROOT_DIR}/lib")
|
||||
|
||||
@@ -109,6 +116,7 @@ include_directories(${SGCT_INCLUDE_DIRS})
|
||||
set(SGCT_INCLUDE_DIRECTORIES ${SGCT_INCLUDES})
|
||||
set(SGCT_LIBRARIES ${SGCT_LIBRARY} ${SGCT_DEPENDENCIES})
|
||||
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set SGCT_FOUND to TRUE
|
||||
# if all listed variables are TRUE
|
||||
find_package_handle_standard_args(SGCT DEFAULT_MSG
|
||||
|
||||
Submodule ext/spice updated: 1947309fea...5419d02cf0
Reference in New Issue
Block a user