Skip to content

Commit

Permalink
Adjust iconv dependency and add install rule
Browse files Browse the repository at this point in the history
  • Loading branch information
tracktwo committed Jan 25, 2018
1 parent 81ef20e commit 8579c26
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,16 @@ add_executable (json2xcom ${json2xcom_sources} ${json2xcom_headers})
set_target_properties (json2xcom PROPERTIES LINKER_LANGUAGE CXX)
target_link_libraries(json2xcom xcomsave zlib)

# Unix builds need libiconv
if (UNIX)
target_link_libraries(json2xcom iconv)
target_link_libraries(xcom2json iconv)
endif (UNIX)

# g++ needs -lstdc++fs for filesystem support.
if (CMAKE_COMPILER_IS_GNUCXX)
target_link_libraries(json2xcom stdc++fs)
endif (CMAKE_COMPILER_IS_GNUCXX)

# MacOS builds need -liconv
if (APPLE)
target_link_libraries(xcom2json iconv)
target_link_libraries(json2xcom iconv)
endif (APPLE)

install(TARGETS xcom2json json2xcom RUNTIME DESTINATION bin)

0 comments on commit 8579c26

Please sign in to comment.