OpenXLSX
OpenXLSX copied to clipboard
OPENXLSX_LIBRARY_TYPE check in cmake
trafficstars
In CMakeList.txt, we have the following:
if(NOT ${OPENXLSX_LIBRARY_TYPE} STREQUAL "STATIC" AND NOT ${OPENXLSX_LIBRARY_TYPE} STREQUAL "SHARED")
message( FATAL_ERROR "Invalid library type. Must be SHARED or STATIC." )
endif()
I will rephrase my situation. My CMake fails with this log when adding this project as subdirectory.
CMake Error at third_party/OpenXLSX/OpenXLSX/CMakeLists.txt:118 (message):
Invalid library type. Must be SHARED or STATIC.
That shouldn't happen at all but are you looking for CMakeLists help?
This part defines default to be "STATIC" so you shouldn't have to change anything in that from the version in the repository: https://github.com/troldal/OpenXLSX/blob/b80da42d1454f361c29117095ebe1989437db390/OpenXLSX/CMakeLists.txt#L34
I also encountered the same problem, is there any solution?