-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
David Levin
committed
Apr 25, 2017
0 parents
commit 674bec8
Showing
384 changed files
with
82,982 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
cmake_minimum_required (VERSION 3.5) | ||
include(${CMAKE_ROOT}/Modules/ExternalProject.cmake) | ||
|
||
project (Gauss) | ||
|
||
set(CMAKE_CXX_STANDARD 14) | ||
|
||
#Output directories | ||
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin ) | ||
set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib ) | ||
|
||
#Global variables to configure other projects | ||
set(GAUSS_INCLUDE_DIR “” CACHE INTERNAL "" FORCE) | ||
set(GAUSS_BINARY_DIR ${PROJECT_BINARY_DIR} CACHE INTERNAL "" FORCE) | ||
|
||
#Second, for multi-config builds (e.g. msvc) | ||
foreach( OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES} ) | ||
string( TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIG ) | ||
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${PROJECT_BINARY_DIR}/bin ) | ||
set( CMAKE_LIBRARY_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${PROJECT_BINARY_DIR}/lib ) | ||
endforeach( OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES ) | ||
|
||
|
||
|
||
#grab important packages | ||
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) | ||
|
||
#Eigen | ||
find_package(Eigen3 REQUIRED) | ||
|
||
#GTest (From Masha Shugrina) | ||
# Google Test | ||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
# Download and install | ||
ExternalProject_Add( | ||
gtest | ||
URL https://github.com/google/googletest/archive/release-1.7.0.zip | ||
PREFIX ${PROJECT_SOURCE_DIR}/ThirdParty/gtest | ||
CMAKE_ARGS ${CMAKE_ARGS} | ||
# Disable install step | ||
INSTALL_COMMAND "" | ||
) | ||
|
||
# Create a libgtest target to be used as a dependency by test programs | ||
add_library(libgtest IMPORTED STATIC GLOBAL) | ||
add_dependencies(libgtest gtest) | ||
|
||
# Set gtest properties | ||
ExternalProject_Get_Property(gtest source_dir binary_dir) | ||
set_target_properties(libgtest PROPERTIES | ||
"IMPORTED_LOCATION" ${PROJECT_BINARY_DIR}/lib/libgtest.a | ||
"IMPORTED_LINK_INTERFACE_LIBRARIES" "${CMAKE_THREAD_LIBS_INIT}" | ||
) | ||
|
||
#Individual feature directories | ||
include_directories(${EIGEN3_INCLUDE_DIR}) | ||
include_directories("${source_dir}/include") #gtest | ||
include_directories(${PROJECT_SOURCE_DIR}/src/Core/include | ||
${PROJECT_SOURCE_DIR}/src/Base/include) | ||
|
||
add_subdirectory(${PROJECT_SOURCE_DIR}/src/Core) | ||
add_subdirectory(${PROJECT_SOURCE_DIR}/src/Base) | ||
add_subdirectory(${PROJECT_SOURCE_DIR}/src/ParticleSystem) | ||
add_subdirectory(${PROJECT_SOURCE_DIR}/src/FEM) | ||
add_subdirectory(${PROJECT_SOURCE_DIR}/src/UI) | ||
|
||
include_directories(${GAUSS_INCLUDE_DIR}) | ||
|
||
#Init GUI Stuff | ||
include(${PROJECT_SOURCE_DIR}/src/UI/UISetup.txt) | ||
initUI() | ||
|
||
#Example codes | ||
add_subdirectory(${PROJECT_SOURCE_DIR}/src/Examples) | ||
add_subdirectory(${PROJECT_SOURCE_DIR}/src/tests) | ||
|
Binary file not shown.
Oops, something went wrong.