File tree Expand file tree Collapse file tree 4 files changed +17
-18
lines changed Expand file tree Collapse file tree 4 files changed +17
-18
lines changed Original file line number Diff line number Diff line change 1818# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1919# SOFTWARE.
2020
21- cmake_minimum_required (VERSION 3.7.2 )
21+ cmake_minimum_required (VERSION 3.11 )
2222
2323# Define the project
2424project (MyModule CXX)
@@ -28,11 +28,9 @@ option(MYMODULE_WITH_TESTS "Compile test projects" ON)
2828# Get MyModule dependencies
2929find_package (OpenGeode REQUIRED)
3030
31- copy_windows_binaries(OpenGeode::basic)
32-
3331#------------------------------------------------------------------------------------------------
3432# Configure the MyModule libraries
35- add_geode_library( mylib)
33+ add_subdirectory (src/ mylib)
3634
3735#------------------------------------------------------------------------------------------------
3836# Optional modules configuration
Original file line number Diff line number Diff line change 1818# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1919# SOFTWARE.
2020
21- set (sources
22- "${lib_source_dir} /hello_world.cpp"
23- )
24- set (public_headers
25- "${lib_include_dir} /hello_world.h"
26- )
27- target_link_libraries (${target_name}
28- PRIVATE
21+ add_geode_library(
22+ NAME mylib
23+ FOLDER "mylib"
24+ SOURCES
25+ "common.cpp"
26+ "hello_world.cpp"
27+ PUBLIC_HEADERS
28+ "hello_world.h"
29+ PRIVATE_DEPENDENCIES
2930 OpenGeode::basic
3031)
Original file line number Diff line number Diff line change 1818# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1919# SOFTWARE.
2020
21- cmake_minimum_required (VERSION 3.7.2 )
21+ cmake_minimum_required (VERSION 3.11 )
2222
2323if (NOT TARGET MyModule::mylib)
2424 project (MyModule CXX)
@@ -27,7 +27,5 @@ if(NOT TARGET MyModule::mylib)
2727 enable_testing ()
2828endif ()
2929
30- set (CTEST_OUTPUT_ON_FAILURE ON )
31-
3230add_subdirectory (mylib)
3331
Original file line number Diff line number Diff line change 1818# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1919# SOFTWARE.
2020
21- add_geode_test(test -hello-world.cpp
22- ${PROJECT_NAME} ::mylib
23- OpenGeode::basic
21+ add_geode_test(
22+ SOURCE "test-hello-world.cpp"
23+ DEPENDENCIES
24+ OpenGeode::basic
25+ ${PROJECT_NAME} ::mylib
2426)
You can’t perform that action at this time.
0 commit comments