Fixed CMakeLists.txt so fx2 support is not enabled by default

Fixed CMakeLists.txt so fx2 related include files are not part of the default build
This commit is contained in:
phdussud 2021-01-09 11:10:59 -08:00
parent 93526cddc7
commit 64a95fe7da
1 changed files with 6 additions and 5 deletions

View File

@ -7,7 +7,7 @@ add_definitions(-DVERSION=\"v${PROJECT_VERSION}\")
option(BUILD_STATIC "Whether or not to build with static libraries" OFF) option(BUILD_STATIC "Whether or not to build with static libraries" OFF)
option(ENABLE_UDEV "use udev to search JTAG adapter from /dev/xx" ON) option(ENABLE_UDEV "use udev to search JTAG adapter from /dev/xx" ON)
option(ENABLE_FPGALINK "enable fx2 cable support through libfpgalink" ON) option(ENABLE_FPGALINK "enable fx2 cable support through libfpgalink" OFF)
option(USE_PKGCONFIG "Use pkgconfig to find libraries" ON) option(USE_PKGCONFIG "Use pkgconfig to find libraries" ON)
option(LINK_CMAKE_THREADS "Use CMake find_package to link the threading library" OFF) option(LINK_CMAKE_THREADS "Use CMake find_package to link the threading library" OFF)
@ -114,9 +114,6 @@ set(OPENFPGALOADER_HEADERS
src/ftdispi.hpp src/ftdispi.hpp
src/lattice.hpp src/lattice.hpp
src/latticeBitParser.hpp src/latticeBitParser.hpp
src/fx2.hpp
src/makestuff/common.h
src/makestuff/libfpgalink.h
) )
add_executable(openFPGALoader add_executable(openFPGALoader
@ -154,7 +151,11 @@ if (ENABLE_FPGALINK)
else() else()
add_definitions(-DENABLE_FX2) add_definitions(-DENABLE_FX2)
target_link_libraries(openFPGALoader ${LIBFPGALINK}) target_link_libraries(openFPGALoader ${LIBFPGALINK})
target_sources(openFPGALoader PRIVATE src/fx2.cpp ) target_sources(openFPGALoader PRIVATE
src/fx2.cpp
src/fx2.hpp
src/makestuff/common.h
src/makestuff/libfpgalink.h)
endif() endif()
endif() endif()