Skip to content

Commit

Permalink
Merge pull request #12 from gdmiron/master
Browse files Browse the repository at this point in the history
Sync with bitbucket
  • Loading branch information
gdmiron authored Nov 11, 2019
2 parents fcbd3d5 + 4a2526b commit 6d83402
Show file tree
Hide file tree
Showing 419 changed files with 734,414 additions and 1,679,630 deletions.
51 changes: 1 addition & 50 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,11 @@
cmake_minimum_required(VERSION 3.0)

# Set the name of the project
project(ThermoFun VERSION 0.2.0 LANGUAGES CXX)
project(ThermoFun VERSION 0.2.2 LANGUAGES CXX)

# Set the cmake module path of the project
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")

if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")

include_directories("${CMAKE_SOURCE_DIR}/../dependencies/include")

else() # build for linux

endif()

if (BUILD_WINDOWS)
set(CMAKE_CXX_STANDARD 11)
# the name of the target operating system
SET(CMAKE_SYSTEM_NAME Windows)

# which compilers to use for C and C++
SET(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc)
SET(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++)

# here is the target environment located
SET(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32)

include_directories("/usr/local/include")
link_directories("/usr/local/lib")

else() # build for linux
endif()

# Use ccache to speed up repeated compilations
include(CCache)

Expand All @@ -46,27 +20,16 @@ include(CondaAware)
option(TFUN_BUILD_SHARED_LIBS "Build shared libraries." ON)
option(TFUN_BUILD_STATIC_LIBS "Build static libraries." ON)
#option(TFUN_BUILD_TESTS "Build tests." OFF)
option(TFUN_BUILD_GUI "Build ThermoFunGui library." OFF)
option(TFUN_BUILD_HUBCLIENT "Build ThermoFun with ThermoHubClient." OFF)
option(TFUN_BUILD_GUIDEMO "Build ThermoFunGui demo." OFF)
option(TFUN_BUILD_PYTHON "Build the python wrappers and python package thermofun." ON)
#option(REFRESH_THIRDPARTY "Refresh thirdparty libraries." OFF)

# Modify the TFUN_BUILD_* variables accordingly to BUILD_ALL
if(TFUN_BUILD_ALL MATCHES ON)
set(TFUN_BUILD_SHARED_LIBS ON)
set(TFUN_BUILD_STATIC_LIBS ON)
# set(TFUN_BUILD_TESTS ON)
set(TFUN_BUILD_GUI ON)
set(TFUN_BUILD_HUBCLIENT ON)
set(TFUN_BUILD_GUIDEMO ON)
set(TFUN_BUILD_PYTHON ON)
endif()

# DBClient is necessary when building the GUI DEMO
if(TFUN_BUILD_GUI MATCHES ON OR TFUN_BUILD_GUIDEMO MATCHES ON)
set(TFUN_BUILD_HUBCLIENT ON)
endif()

# Set the default build type to Release
if(NOT CMAKE_BUILD_TYPE)
Expand Down Expand Up @@ -126,21 +89,9 @@ file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/Resources
# add_subdirectory(tests EXCLUDE_FROM_ALL)
#endif()

# Build ThermoFunGui library
if(TFUN_BUILD_HUBCLIENT)
add_subdirectory(ThermoHubClient)
endif()

# Build ThermoFunGui library
if(TFUN_BUILD_GUI)
add_subdirectory(ThermoFunGui)
endif()

# Build python wraper
if(TFUN_BUILD_PYTHON)
add_subdirectory(python)
else()
add_subdirectory(python EXCLUDE_FROM_ALL)
endif()

# Install the cmake config files that permit users to use find_package(ThermoFun)
Expand Down
Loading

0 comments on commit 6d83402

Please sign in to comment.