Experimental auto submodule clone

This commit is contained in:
Dynamitos
2020-03-25 11:55:50 +01:00
parent ae92439164
commit 018a3a8974
3 changed files with 55 additions and 10 deletions
+5 -2
View File
@@ -14,17 +14,20 @@ set(GLFW_ROOT ${EXTERNAL_ROOT}/glfw)
set(CMAKE_BINARY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/bin/${CMAKE_BUILD_TYPE})
set(RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR})
set(Boost_DETAILED_FAILURE_MSG TRUE)
# Configuration types
SET(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "Configs" FORCE)
IF(DEFINED CMAKE_BUILD_TYPE AND CMAKE_VERSION VERSION_GREATER "2.8")
SET_PROPERTY(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS ${CMAKE_CONFIGURATION_TYPES})
ENDIF()
SET(CMAKE_ARCHITECTURES "x86;x64" CACHE STRING "Architectures" FORCE)
IF(DEFINED CMAKE_GENERATOR_PLATFORM AND CMAKE_VERSION VERSION_GREATER "2.8")
SET_PROPERTY(CACHE CMAKE_GENERATOR_PLATFORM PROPERTY STRINGS ${CMAKE_ARCHITECTURES})
ENDIF()
set(Boost_USE_STATIC_LIBS ON)
set(Boost_LIB_PREFIX lib)
set(Boost_USE_RELEASE_LIBS OFF)
set(ENKITS_BUILD_EXAMPLES OFF CACHE BOOL "Build basic example applications" )
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "GLFW lib only" )
set(GLFW_BUILD_TESTS OFF CACHE BOOL "GLFW lib only" )
+34
View File
@@ -0,0 +1,34 @@
{
"buildType": {
"default": "debug",
"description": "Configuration Type",
"choices": {
"debug": {
"short": "Debug",
"long": "Enable debugging and validation",
"buildType": "Debug"
},
"release": {
"short": "Release",
"long": "Optimize binary for speed",
"buildType": "Release"
}
}
},
"architecture": {
"default": "x64",
"description": "Platform Architecture",
"choices": {
"x64": {
"short": "x64",
"long": "amd64 platform",
"CMAKE_GENERATOR_PLATFORM": "x64"
},
"x86": {
"short": "x86",
"long": "x86 platform",
"CMAKE_GENERATOR_PLATFORM": "x86"
}
}
}
}
+16 -8
View File
@@ -5,12 +5,13 @@ set_property(DIRECTORY PROPERTY EP_BASE external)
set(DEPENDENCIES)
set(EXTRA_CMAKE_ARGS)
set(DEPENDENT_BINARIES "")
execute_process(COMMAND git submodule update --init --recursive -- ${CMAKE_SOURCE_DIR})
#-------------BOOST----------------
list(APPEND DEPENDENCIES boost)
if(WIN32)
set(BOOTSTRAP_EXTENSION bat)
elseif(UNIX)
else()
set(BOOTSTRAP_EXTENSION sh)
endif()
ExternalProject_Add(boost
@@ -55,21 +56,28 @@ list(APPEND EXTRA_CMAKE_ARGS
#
#--------------SLang------------------------------
list(APPEND DEPENDENCIES slang)
if(WIN32)
ExternalProject_Add(slang
SOURCE_DIR ${SLANG_ROOT}
BINARY_DIR ${CMAKE_BINARY_DIR}/lib
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
# BUILD_COMMAND devenv /upgrade ${SLANG_ROOT}/source/slang/slang.vcxproj
# COMMAND msbuild -m /p:WindowsTargetPlatformVersion=10.0 ${SLANG_ROOT}/source/slang/slang.vcxproj
BUILD_COMMAND devenv /upgrade ${SLANG_ROOT}/source/slang/slang.vcxproj
COMMAND msbuild -m /p:WindowsTargetPlatformVersion=10.0 ${SLANG_ROOT}/source/slang/slang.vcxproj
INSTALL_COMMAND "")
elseif(UNIX)
ExternalProject_Add(slang
SOURCE_DIR ${SLANG_ROOT}
BINARY_DIR ${CMAKE_BINARY_DIR}/lib
CONFIGURE_COMMAND ""
BUILD_COMMAND premake5 config=${CMAKE_BUILD_TYPE}_${CMAKE_GENERATOR_PLATFORM}
INSTALL_COMMAND "")
endif()
if(WIN32)
string(TOLOWER bin/windows-x64/${CMAKE_BUILD_TYPE}/slang.dll SLANG_BINARY)
string(TOLOWER bin/windows-x64/${CMAKE_BUILD_TYPE}/slang.lib SLANG_LIB_PATH)
string(TOLOWER bin/windows-${CMAKE_GENERATOR_PLATFORM}/${CMAKE_BUILD_TYPE}/slang.dll SLANG_BINARY)
string(TOLOWER bin/windows-${CMAKE_GENERATOR_PLATFORM}/${CMAKE_BUILD_TYPE}/slang.lib SLANG_LIB_PATH)
set(SLANG_LIB_PATH ${SLANG_ROOT}/${SLANG_LIB_PATH})
elseif(UNIX)
string(TOLOWER bin/linux-x86/${CMAKE_BUILD_TYPE}/libslang.so SLANG_BINARY)
string(TOLOWER bin/linux-${CMAKE_GENERATOR_PLATFORM}/${CMAKE_BUILD_TYPE}/libslang.so SLANG_BINARY)
set(SLANG_LIB_PATH)
endif()