Files
eqemu-server/tests/CMakeLists.txt
T
brainiac 11a8e46ee8
Build / Linux (push) Has been cancelled
Build / Windows (push) Has been cancelled
CMake cleanup (#5082)
2026-05-17 15:05:46 -07:00

48 lines
1.0 KiB
CMake

add_subdirectory(cppunit)
set(tests_sources
main.cpp
)
set(tests_headers
atobool_test.h
data_verification_test.h
fixed_memory_test.h
fixed_memory_variable_test.h
hextoi_32_64_test.h
ipc_mutex_test.h
memory_mapped_file_test.h
string_util_test.h
skills_util_test.h
task_state_test.h
)
add_executable(tests ${tests_sources} ${tests_headers})
target_link_libraries(tests common cppunit)
install(TARGETS tests RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
if(MSVC)
set_target_properties(tests PROPERTIES LINK_FLAGS_RELEASE "/OPT:REF /OPT:ICF")
target_link_libraries(tests "Ws2_32.lib")
endif()
if(MINGW)
target_link_libraries(tests "WS2_32")
endif()
if(UNIX)
target_link_libraries(tests "${CMAKE_DL_LIBS}")
target_link_libraries(tests "z")
target_link_libraries(tests "m")
if(NOT DARWIN)
target_link_libraries(tests "rt")
endif()
target_link_libraries(tests "pthread")
add_definitions(-fPIC)
endif()
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
set_property(TARGET tests PROPERTY FOLDER executables/tests)