Skip to content

Commit 5d70b04

Browse files
committed
fix(OpenGeode): porting to OpenGeode v4
1 parent 03e97ef commit 5d70b04

File tree

4 files changed

+17
-18
lines changed

4 files changed

+17
-18
lines changed

CMakeLists.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
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
2424
project(MyModule CXX)
@@ -28,11 +28,9 @@ option(MYMODULE_WITH_TESTS "Compile test projects" ON)
2828
# Get MyModule dependencies
2929
find_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

src/mylib/CMakeLists.txt

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,14 @@
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
)

tests/CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
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
if(NOT TARGET MyModule::mylib)
2424
project(MyModule CXX)
@@ -27,7 +27,5 @@ if(NOT TARGET MyModule::mylib)
2727
enable_testing()
2828
endif()
2929

30-
set(CTEST_OUTPUT_ON_FAILURE ON)
31-
3230
add_subdirectory(mylib)
3331

tests/mylib/CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
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
)

0 commit comments

Comments
 (0)