Skip to content

Commit

Permalink
Proper linking on Linux, half-baked flags for static runtime on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
retifrav committed Nov 11, 2021
1 parent 98a251a commit 6dbe7d3
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,14 @@ if(${QT_TARGET_TYPE} STREQUAL "STATIC_LIBRARY")
else()
message(WARNING "It is unknown if Qt with major version ${QT_VERSION_MAJOR} has an import_qml_plugins function")
endif()

# static C++ runtime on Windows
# not the right way to do it, apparently
#if(WIN32)
# #set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Release>:Release>")
# #set(CMAKE_CXX_FLAGS_RELEASE "/MD")
# #set(CMAKE_CXX_FLAGS_DEBUG "/MDd")
#endif()
endif()

set(sources
Expand Down Expand Up @@ -142,10 +150,11 @@ if (UNIX)
# )
else()
target_link_libraries(${CMAKE_PROJECT_NAME}
${CMAKE_THREAD_LIBS_INIT}
${X11_LIBRARIES}
${CMAKE_DL_LIBS}
)
PRIVATE
${CMAKE_THREAD_LIBS_INIT}
${X11_LIBRARIES}
${CMAKE_DL_LIBS}
)
endif()
endif()

Expand Down

0 comments on commit 6dbe7d3

Please sign in to comment.