Open MicBosi opened 4 years ago
And more gracefully include library with:
add_subdirectory("zlib-1.2.11") set_property(TARGET zlibstatic PROPERTY POSITION_INDEPENDENT_CODE ON) include_directories(MyProgram "${CMAKE_CURRENT_BINARY_DIR}/zlib-1.2.11") # necessary to pickup zconf.h include_directories(MyProgram "zlib-1.2.11") ... target_link_libraries(MyProgram zlibstatic)
Also if not in DLL mode then zlibstatic needs to be copied to install directory so binaries can use it (discouraged use).
And more gracefully include library with:
Also if not in DLL mode then zlibstatic needs to be copied to install directory so binaries can use it (discouraged use).