Skip to content

Commit

Permalink
fix paths in CMakeLists.txt when including zipper sources from the su…
Browse files Browse the repository at this point in the history
…bmodule

- use recursive glob to also include sources from zipper minizip submodule
  • Loading branch information
lkeegan committed Oct 10, 2022
1 parent 0826e5d commit 45fdf42
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ find_package(LIBSBML REQUIRED)


# detect zipper library if sources are not included
if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/src/zipper)
if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/submodules/zipper)

find_package(ZIPPER REQUIRED)

Expand Down Expand Up @@ -495,14 +495,14 @@ file(GLOB COMBINE_SOURCES
source_group(combine FILES ${COMBINE_SOURCES} ${COMBINE_HEADERS})

# if we have the zipper sources, include them directly
if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/src/zipper)
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/src/zipper)
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/src)
if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/submodules/zipper)
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/submodules/zipper/zipper)
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/submodules/zipper)

file(GLOB ZIPPER_SOURCES
file(GLOB_RECURSE ZIPPER_SOURCES
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/src
${CMAKE_CURRENT_SOURCE_DIR}/src/zipper/*.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/zipper/*.h
${CMAKE_CURRENT_SOURCE_DIR}/submodules/zipper/*.cpp
${CMAKE_CURRENT_SOURCE_DIR}/submodules/zipper/*.h
)

set(COMBINE_SOURCES ${COMBINE_SOURCES} ${ZIPPER_SOURCES})
Expand Down

0 comments on commit 45fdf42

Please sign in to comment.