Skip to content

Commit

Permalink
moved pthread to win32
Browse files Browse the repository at this point in the history
  • Loading branch information
lausdahl committed Dec 8, 2016
1 parent e32164b commit 68bbaa5
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions string-in/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ add_library(${PROJECT_NAME} SHARED ${C_FILES} ${CPP_FILES})

include_directories(sources ../includes/fmi/include)

set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -lpthread")

foreach(LETTER ${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES})

Expand All @@ -48,15 +47,11 @@ endforeach()
message(STATUS "Static linking with libstdc++.a in ${STDCPP_LIBRARY}")
target_link_libraries(${PROJECT_NAME} ${STDCPP_LIBRARY})




find_library(PTHREAD_LIBRARY NAMES libpthread.a libpthread.dylib)
target_link_libraries(${PROJECT_NAME} ${PTHREAD_LIBRARY})

# I need this: -static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++ -lpthread -Wl,-Bdynamic

if (WIN32)
find_library(PTHREAD_LIBRARY NAMES libpthread.a)
target_link_libraries(${PROJECT_NAME} ${PTHREAD_LIBRARY})
#windows
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static-libstdc++ -static-libgcc")
endif()
Expand Down

0 comments on commit 68bbaa5

Please sign in to comment.