E57Format: for CMake version < 3.11 add_library requires explicit list of source files
This commit is contained in:
9
src/3rdParty/libE57Format/CMakeLists.txt
vendored
9
src/3rdParty/libE57Format/CMakeLists.txt
vendored
@@ -100,13 +100,18 @@ option( E57_WRITE_CRAZY_PACKET_MODE "Compile library to enable reader-stressing
|
||||
set( revision_id "${PROJECT_NAME}-${PROJECT_VERSION}-${${PROJECT_NAME}_BUILD_TAG}" )
|
||||
message( STATUS "[E57] Revison ID: ${revision_id}" )
|
||||
|
||||
# Need to explicitly set the source files to add_library()
|
||||
if(${CMAKE_VERSION} VERSION_LESS "3.11.0")
|
||||
file(GLOB E57Format_SOURCES src/[^.]*.cpp)
|
||||
endif()
|
||||
|
||||
# Target
|
||||
if ( E57_BUILD_SHARED )
|
||||
message( STATUS "[E57] Building shared library" )
|
||||
add_library( E57Format SHARED )
|
||||
add_library( E57Format SHARED ${E57Format_SOURCES})
|
||||
else()
|
||||
message( STATUS "[E57] Building static library" )
|
||||
add_library( E57Format STATIC )
|
||||
add_library( E57Format STATIC ${E57Format_SOURCES})
|
||||
endif()
|
||||
|
||||
include( E57ExportHeader )
|
||||
|
||||
Reference in New Issue
Block a user