Skip to content

Commit

Permalink
Add link options for MSVC.
Browse files Browse the repository at this point in the history
  • Loading branch information
abellgithub committed Feb 9, 2024
1 parent 26ea2cd commit 4fdeeb3
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ file(GLOB SRCS
bu/*.cpp
)

#if(MSVC)
# set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} \
# /SUBSYSTEM:WINDOWS /ENTRY:wmainCRTStartup")
#endif()

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)

add_executable(untwine ${SRCS} ${LAZPERF_SRCS})
Expand All @@ -47,6 +42,12 @@ target_link_libraries(untwine
${CMAKE_THREAD_LIBS_INIT}
${PDAL_LIBRARIES}
)
if(MSVC)
target_link_options(untwine
PRIVATE
/SUBSYSTEM:WINDOWS /ENTRY:wmainCRTStartup"
)
endif()
install(TARGETS untwine DESTINATION bin)
Expand Down

0 comments on commit 4fdeeb3

Please sign in to comment.