diff --git a/CMakeLists.txt b/CMakeLists.txt index c7c6c1a47..dd622766a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,6 +43,10 @@ if(APPLE) set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++") endif() +if(WINDOWS) + set(CMAKE_GENERATOR "Visual Studio 17" CACHE STRING INTERNAL "" FORCE) +endif() + enable_language(C CXX) set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON) @@ -57,7 +61,6 @@ if(POLICY CMP0135) cmake_policy(SET CMP0135 NEW) endif() - # root directory of the project set(PHD_PROJECT_ROOT_DIR ${CMAKE_SOURCE_DIR}) set(phd_src_dir ${PHD_PROJECT_ROOT_DIR}/src) diff --git a/build/build-win b/build/build-win index 60f8e7ab7..5880ca685 100755 --- a/build/build-win +++ b/build/build-win @@ -86,7 +86,7 @@ mkdir -p tmp cd tmp cat >run_cmake.bat <= 3.0, a version of cmake >= 3.0 should be used on Windows # on Linux/OSX it works properly this way). +set(wxWidgets_PREFIX_DIRECTORY $ENV{WXWIN} CACHE PATH "wxWidgets directory") + if(WIN32) # wxWidgets set(wxWidgets_CONFIGURATION msw CACHE STRING "Set wxWidgets configuration") @@ -644,7 +646,10 @@ else() ## Define LIBNOVA when building Indi from source. add_definitions("-DLIBNOVA") endif() - list(APPEND PHD_EXTERNAL_PROJECT_DEPENDENCIES indi) + # adding indi as a dependency allows a developer to build phd2 in + # the IDE without explicitly building anything else first, but this + # slows down incremental development + # list(APPEND PHD_EXTERNAL_PROJECT_DEPENDENCIES indi) endif()