Skip to content

Commit

Permalink
CMake: MeshTools now depends on Trade unconditionally.
Browse files Browse the repository at this point in the history
Isn't it great when I discover this five minutes before merging to
master?
  • Loading branch information
mosra committed Mar 11, 2020
1 parent a4bf0e6 commit 236954a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
5 changes: 2 additions & 3 deletions modules/FindMagnum.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -378,10 +378,9 @@ if(MAGNUM_TARGET_GL)
set(_MAGNUM_DebugTools_GL_DEPENDENCY_IS_OPTIONAL ON)
endif()

set(_MAGNUM_MeshTools_DEPENDENCIES )
set(_MAGNUM_MeshTools_DEPENDENCIES Trade)
if(MAGNUM_TARGET_GL)
# Trade is used only in compile(), which needs GL as well
list(APPEND _MAGNUM_MeshTools_DEPENDENCIES Trade GL)
list(APPEND _MAGNUM_MeshTools_DEPENDENCIES GL)
endif()

set(_MAGNUM_OpenGLTester_DEPENDENCIES GL)
Expand Down
8 changes: 4 additions & 4 deletions src/Magnum/MeshTools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ elseif(BUILD_STATIC_PIC)
set_target_properties(MagnumMeshTools PROPERTIES POSITION_INDEPENDENT_CODE ON)
endif()
target_link_libraries(MagnumMeshTools PUBLIC
Magnum)
Magnum MagnumTrade)
if(TARGET_GL)
target_link_libraries(MagnumMeshTools PUBLIC MagnumGL MagnumTrade)
target_link_libraries(MagnumMeshTools PUBLIC MagnumGL)
endif()

install(TARGETS MagnumMeshTools
Expand All @@ -131,9 +131,9 @@ if(BUILD_TESTS)
set_target_properties(MagnumMeshToolsTestLib PROPERTIES POSITION_INDEPENDENT_CODE ON)
endif()
target_link_libraries(MagnumMeshToolsTestLib PUBLIC
Magnum)
Magnum MagnumTrade)
if(TARGET_GL)
target_link_libraries(MagnumMeshToolsTestLib PUBLIC MagnumGL MagnumTrade)
target_link_libraries(MagnumMeshToolsTestLib PUBLIC MagnumGL)
endif()

add_subdirectory(Test)
Expand Down

0 comments on commit 236954a

Please sign in to comment.