-
Notifications
You must be signed in to change notification settings - Fork 216
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
1 parent
81cc9d6
commit a3f9574
Showing
4 changed files
with
108 additions
and
66 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,29 @@ | ||
# Boost.Geometry | ||
# Example CMakeLists.txt building the Boost.Geometry with wxWidget example | ||
# | ||
# Copyright (c) 2021-2024 Barend Gehrels, Amsterdam, the Netherlands. | ||
|
||
# Use, modification and distribution is subject to the Boost Software License, | ||
# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at | ||
# http://www.boost.org/LICENSE_1_0.txt) | ||
|
||
cmake_minimum_required(VERSION 3.8...3.20) | ||
|
||
project(wx_widgets_world_mapper) | ||
|
||
add_executable(${PROJECT_NAME} x04_wxwidgets_world_mapper.cpp) | ||
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_14) | ||
|
||
# Link the wxWidgets libraries to our executable | ||
# Assuming it can be found by CMake in /usr/local | ||
find_package(wxWidgets 3.3 COMPONENTS core base REQUIRED CONFIG) | ||
target_link_libraries(${PROJECT_NAME} wxWidgets::wxWidgets) | ||
|
||
# Link the Boost.Geometry library to our executable | ||
# By default, it is assumed to be relative to this directory. | ||
target_include_directories(${PROJECT_NAME} PRIVATE ../../../../..) | ||
|
||
# If this does not work, or you build from elsewhere | ||
# First set BOOST_ROOT | ||
# Then use find_package(Boost) | ||
# Then use target_link_libraries(${PROJECT_NAME} Boost::geometry) |
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,47 @@ | ||
# ![Boost.Geometry](../../../doc/other/logo/logo_bkg.png) | ||
|
||
# wxWidgets | ||
|
||
## Introduction | ||
|
||
[wxWidgets](https://www.wxwidgets.org/) is a stable and powerful open source framework for developing native cross-platform GUI applications in C++. | ||
|
||
## Building wxWidgets | ||
|
||
There are several possibilities. This documentation uses the CMake approach. | ||
|
||
* Retrieve wxWidgets from github | ||
* Be sure to also retrieve the git submodules | ||
* Build and install with cmake, such that it can be found from anywhere. | ||
|
||
``` | ||
cd ~git | ||
git clone --recurse-submodules [email protected]:wxWidgets/wxWidgets.git | ||
cd wxWidgets | ||
mkdir my_build_folder | ||
cd my_build_folder | ||
cmake .. | ||
cmake --build . | ||
sudo cmake --build . --target install | ||
``` | ||
|
||
It is (on macOs) now installed in `/usr/local/lib/` | ||
|
||
## Building this example | ||
|
||
Assuming you want to build it with CMake | ||
|
||
``` | ||
cd example/with_external_libs/wxwidgets | ||
mkdir my_build_folder | ||
cd my_build_folder | ||
cmake .. | ||
cmake --build . | ||
``` | ||
|
||
## Running this example | ||
|
||
You can pass an Ascii file with WKT polygons as the first command line argument. There are several | ||
packed with Boost.Geometry as examples and as test data. | ||
|
||
For example: `./wx_widgets_world_mapper ../../../data/world.wkt` |
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