mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-05 19:19:39 -06:00
Remove static version.h and replace by autogenerated file
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -34,3 +34,4 @@ gui/externaltimecontrol/CMakeLists.txt
|
||||
gui/externaltimecontrol/main.cpp
|
||||
gui/externaltimecontrol/mainwindow.cpp
|
||||
gui/externaltimecontrol/mainwindow.h
|
||||
include/openspace/version.h
|
||||
|
||||
@@ -35,7 +35,6 @@ message(STATUS "Generating OpenSpace project")
|
||||
#########################################################################################
|
||||
# General Settings
|
||||
#########################################################################################
|
||||
|
||||
set(OPENSPACE_BASE_DIR "${PROJECT_SOURCE_DIR}")
|
||||
set(OPENSPACE_EXT_DIR "${OPENSPACE_BASE_DIR}/ext")
|
||||
set(OPENSPACE_CMAKE_EXT_DIR "${OPENSPACE_BASE_DIR}/support/cmake")
|
||||
@@ -47,6 +46,16 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${OPENSPACE_LIBRARY_DIR})
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${OPENSPACE_LIBRARY_DIR})
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${OPENSPACE_BINARY_DIR})
|
||||
|
||||
# Set current OpenSpace Version
|
||||
set(OPENSPACE_MAJOR_VERSION 0)
|
||||
set(OPENSPACE_MINOR_VERSION 1)
|
||||
set(OPENSPACE_PATCH_VERSION 0)
|
||||
mark_as_advanced(OPENSPACE_MAJOR_VERSION,O configurPENSPACE_MINOR_VERSION, OPENSPACE_PATCH_VERSION)
|
||||
set(OPENSPACE_VERSION ${OPENSPACE_MAJOR_VERSION}.${OPENSPACE_MINOR_VERSION}.${OPENSPACE_PATCH_VERSION})
|
||||
set(OPENSPACE_VERSION_STRING "prerelease-5")
|
||||
message(STATUS "Version: ${OPENSPACE_VERSION} (${OPENSPACE_VERSION_STRING})")
|
||||
configure_file(${OPENSPACE_CMAKE_EXT_DIR}/version.template ${OPENSPACE_BASE_DIR}/include/openspace/version.h)
|
||||
|
||||
#############################
|
||||
# Including the source files (with source groups already defined)
|
||||
#############################
|
||||
@@ -65,7 +74,6 @@ target_link_libraries(OpenSpace libOpenSpace)
|
||||
#############################
|
||||
# Compile settings
|
||||
#############################
|
||||
|
||||
if (MSVC)
|
||||
target_compile_options(libOpenSpace PUBLIC "/MP" "/wd4201" "/wd4127")
|
||||
set_target_properties(OpenSpace PROPERTIES LINK_FLAGS "/NODEFAULTLIB:\"LIBCMTD.lib;LIBCMT.lib\"")
|
||||
@@ -92,7 +100,6 @@ endif ()
|
||||
#############################
|
||||
# Dependencies
|
||||
#############################
|
||||
|
||||
# Ghoul
|
||||
add_subdirectory(${OPENSPACE_EXT_DIR}/ghoul)
|
||||
target_link_libraries(libOpenSpace Ghoul)
|
||||
|
||||
Submodule ext/ghoul updated: 63b25b5513...3eb1598c3c
@@ -1,28 +0,0 @@
|
||||
/*****************************************************************************************
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2015 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
* without restriction, including without limitation the rights to use, copy, modify, *
|
||||
* merge, publish, distribute, sublicense, and/or sell copies of the Software, and to *
|
||||
* permit persons to whom the Software is furnished to do so, subject to the following *
|
||||
* conditions: *
|
||||
* *
|
||||
* The above copyright notice and this permission notice shall be included in all copies *
|
||||
* or substantial portions of the Software. *
|
||||
* *
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, *
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A *
|
||||
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT *
|
||||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF *
|
||||
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE *
|
||||
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
||||
****************************************************************************************/
|
||||
|
||||
#define OPENSPACE_VERSION_MAJOR 0
|
||||
#define OPENSPACE_VERSION_MINOR 1
|
||||
#define OPENSPACE_VERSION_REVISION 0
|
||||
#define OPENSPACE_VERSION_STRING "prerelease-5"
|
||||
11
support/cmake/version.template
Normal file
11
support/cmake/version.template
Normal file
@@ -0,0 +1,11 @@
|
||||
/* This is a file that was automatically generated by CMake */
|
||||
|
||||
#ifndef __VERSION_H__
|
||||
#define __VERSION_H__
|
||||
|
||||
#define OPENSPACE_VERSION_MAJOR @OPENSPACE_MAJOR_VERSION@
|
||||
#define OPENSPACE_VERSION_MINOR @OPENSPACE_MINOR_VERSION@
|
||||
#define OPENSPACE_VERSION_PATCH @OPENSPACE_PATCH_VERSION@
|
||||
#define OPENSPACE_VERSION_STRING "@OPENSPACE_VERSION_STRING@"
|
||||
|
||||
#endif // __VERSION_H__
|
||||
Reference in New Issue
Block a user