diff --git a/CMakeLists.txt b/CMakeLists.txt index 1c73171..e73079d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,16 +9,21 @@ add_library(Arbutils SHARED ${SRC_FILES}) set_target_properties(Arbutils PROPERTIES LINKER_LANGUAGE CXX) file(GLOB_RECURSE TEST_FILES "tests/*.cpp" "tests/*.hpp") -add_executable(ArbutilsTests ${TEST_FILES} extern/catch.hpp) - -target_link_libraries(ArbutilsTests Arbutils) +if (NOT DEFINED CONAN_EXPORTED) + add_executable(ArbutilsTests ${TEST_FILES} extern/catch.hpp) + target_link_libraries(ArbutilsTests Arbutils) +endif() if (WINDOWS) MESSAGE(WARNING, "Using Windows Build.") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64 -Wa,-mbig-obj -Wl,-allow-multiple-definition") # Statically link libraries we need in Windows. target_link_libraries(Arbutils -static -static-libgcc -static-libstdc++) - target_link_libraries(ArbutilsTests -static -static-libgcc -static-libstdc++) + if (NOT DEFINED CONAN_EXPORTED) + target_link_libraries(ArbutilsTests -static -static-libgcc -static-libstdc++) + endif() endif (WINDOWS) -target_compile_definitions(ArbutilsTests PRIVATE TESTS_BUILD) +if (NOT DEFINED CONAN_EXPORTED) + target_compile_definitions(ArbutilsTests PRIVATE TESTS_BUILD) +endif()