I want to build a shared library for Linux and a static library for Windows. So I have tried:
set (_star_lib_name "StdStars") add_library(${_star_lib_name} $<$<CXX_COMPILER_ID:GNU>:SHARED> $<$<CXX_COMPILER_ID:MSVC>:STATIC> "" ) but that gives me error: CMake Error at C:/SVNProj/zodiac/branches/TRY_TML_CMake_3Oct2019/StarLibs/StdStars/CMakeLists.txt:7 (add_library): Cannot find source file: STATIC Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx What is the correct way of doing this please?
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake