Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build system tweaks #1275

Merged
merged 1 commit into from
Dec 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion build/build-win
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ mkdir -p tmp
cd tmp

cat >run_cmake.bat <<EOF
"$CMAKE_W" -Wno-dev -G "Visual Studio 17" -A Win32 ${vcpkg_args[@]} "-DwxWidgets_PREFIX_DIRECTORY=%WXWIN%" ..
"$CMAKE_W" -Wno-dev -A Win32 "${vcpkg_args[@]}" ..
EOF
"$CMD" /c run_cmake.bat

Expand Down
1 change: 0 additions & 1 deletion run_cmake-osx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ mkdir -p "$tmp"
cd "$tmp"

cmake -G "Unix Makefiles" \
-DwxWidgets_PREFIX_DIRECTORY="$WXWIN" \
-DCMAKE_OSX_ARCHITECTURES="$APPLE_ARCH" \
-DCMAKE_BUILD_TYPE="$buildtype" \
"${cmake_extra_args[@]}" \
Expand Down
2 changes: 1 addition & 1 deletion run_cmake.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@mkdir tmp
@cd tmp
cmake -Wno-dev -G "Visual Studio 17" -A Win32 "-DwxWidgets_PREFIX_DIRECTORY=%WXWIN%" ..
cmake -Wno-dev -A Win32 ..
@cd ..
7 changes: 6 additions & 1 deletion thirdparty/thirdparty.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,8 @@ endif()
# version >= 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")
Expand Down Expand Up @@ -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()


Expand Down
Loading