cmake install not installing libraries on windows -
for reason, below cmake file fails install project libraries. create directory in right location, , recursively installs headers... fails install library. ideas?
cmake_minimum_required(version 2.8) project(mylib) include_directories(include) add_library(mylib shared source/stuff.cpp) if(cmake_system matches "windows") target_link_libraries(mylib dbghelp ws2_32 iphlpapi) set(cmake_install_prefix "../../devel_artifacts") endif(cmake_system matches "windows") install(targets mylib library destination "lib" archive destination "lib" component library) install(directory include/${project_name} destination include)
you're missing runtime destination
argument in install(targets...)
command.
cmake treats shared libraries runtime objects on "dll platforms" windows. if change command to:
install(targets mylib library destination "lib" archive destination "lib" runtime destination "bin" component library)
then should find mylib.dll ends in "devel_artifacts/bin".
Comments
Post a Comment