Skip to content

Commit ac9aa67

Browse files
committed
remove boost from CMakeLists.txt, tests will need to be added back later on without it
1 parent 83bd665 commit ac9aa67

File tree

1 file changed

+1
-55
lines changed

1 file changed

+1
-55
lines changed

CMakeLists.txt

Lines changed: 1 addition & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,6 @@ if(VALIDATE_OPENGL_PROGRAMS)
130130
endif()
131131
endif()
132132

133-
# todo: we should probably always require that to avoid an incomplete
134-
# installation with shared libs. it is static on windows luckily.
135-
if (APPLE OR WIN32)
136-
set (Boost_USE_STATIC_LIBS ON)
137-
endif()
138133

139134
if (WIN32)
140135
if ("cxx_variable_templates" IN_LIST CMAKE_CXX_COMPILE_FEATURES)
@@ -145,7 +140,6 @@ if (WIN32)
145140
endif()
146141

147142
FIND_PACKAGE( OpenGL REQUIRED )
148-
FIND_PACKAGE( Boost 1.71 COMPONENTS thread filesystem system unit_test_framework REQUIRED )
149143
find_package (Qt5 COMPONENTS Widgets OpenGL OpenGLExtensions)
150144

151145
if (USE_SQL)
@@ -580,9 +574,6 @@ endif()
580574

581575
TARGET_LINK_LIBRARIES (noggit
582576
${OPENGL_LIBRARIES}
583-
Boost::thread
584-
Boost::filesystem
585-
Boost::system
586577
Qt5::Widgets
587578
Qt5::OpenGL
588579
Qt5::OpenGLExtensions
@@ -691,7 +682,7 @@ else()
691682

692683
SET(APPS "${CMAKE_CURRENT_BINARY_DIR}/noggit.app")
693684

694-
SET(DIRS ${OPENGL_LIBRARY_DIR} ${STORMLIB_LIBRARY_DIR} ${Boost_LIBRARY_DIR})
685+
SET(DIRS ${OPENGL_LIBRARY_DIR} ${STORMLIB_LIBRARY_DIR})
695686
INSTALL(CODE " include(BundleUtilities) fixup_bundle(\"${APPS}\" \"\" \"${DIRS}\" " COMPONENT Runtime)
696687

697688
SET(CPACK_BUNDLE_NAME "Noggit 3")
@@ -704,51 +695,6 @@ else()
704695
INCLUDE(CPack)
705696
endif()
706697

707-
add_library (noggit-math STATIC
708-
"src/math/matrix_4x4.cpp"
709-
"src/math/vector_2d.cpp"
710-
)
711-
add_library (noggit::math ALIAS noggit-math)
712-
target_compile_options (noggit-math PRIVATE ${NOGGIT_CXX_FLAGS})
713-
714-
include (CTest)
715-
enable_testing()
716-
717-
# boost::unit_test_framework, when linked using a shared library,
718-
# needs to be explicitly told to generate `main()` as well. CMake's
719-
# FindBoost does not do that, so detect what type of library it gave
720-
# us and fix up that flag if needed.
721-
# todo: what is the state of this on windows?
722-
if ( TARGET Boost::unit_test_framework
723-
AND Boost_UNIT_TEST_FRAMEWORK_LIBRARY MATCHES ".*\.so[0-9\.]*$")
724-
get_property (_current_options
725-
TARGET Boost::unit_test_framework
726-
PROPERTY INTERFACE_COMPILE_DEFINITIONS)
727-
set (_boost_test_shared_link_option BOOST_TEST_DYN_LINK)
728-
if (NOT _boost_test_shared_link_option IN_LIST _current_options)
729-
set_property (TARGET Boost::unit_test_framework APPEND
730-
PROPERTY INTERFACE_COMPILE_DEFINITIONS ${_boost_test_shared_link_option})
731-
endif()
732-
endif()
733-
734-
add_executable (math-vector_2d.test test/math/vector_2d.cpp)
735-
target_compile_definitions (math-vector_2d.test PRIVATE "-DBOOST_TEST_MODULE=\"math\"")
736-
target_compile_options (math-vector_2d.test PRIVATE ${NOGGIT_CXX_FLAGS})
737-
target_link_libraries (math-vector_2d.test Boost::unit_test_framework noggit::math)
738-
add_test (NAME math-vector_2d COMMAND $<TARGET_FILE:math-vector_2d.test>)
739-
740-
add_executable (math-trig.test test/math/trig.cpp)
741-
target_compile_definitions (math-trig.test PRIVATE "-DBOOST_TEST_MODULE=\"math\"")
742-
target_compile_options (math-trig.test PRIVATE ${NOGGIT_CXX_FLAGS})
743-
target_link_libraries (math-trig.test Boost::unit_test_framework noggit::math)
744-
add_test (NAME math-trig COMMAND $<TARGET_FILE:math-trig.test>)
745-
746-
add_executable (math-matrix_4x4.test test/math/matrix_4x4.cpp)
747-
target_compile_definitions (math-matrix_4x4.test PRIVATE "-DBOOST_TEST_MODULE=\"math\"")
748-
target_compile_options (math-matrix_4x4.test PRIVATE ${NOGGIT_CXX_FLAGS})
749-
target_link_libraries (math-matrix_4x4.test Boost::unit_test_framework noggit::math)
750-
add_test (NAME math-matrix_4x4 COMMAND $<TARGET_FILE:math-matrix_4x4.test>)
751-
752698
include (FetchContent)
753699

754700
# Dependency: StormLib

0 commit comments

Comments
 (0)