Fix CMake build for windows.

Thank you linker flags for eating my 3+ hours.
This commit is contained in:
Saurabh Shrivastava 2017-06-03 22:32:15 +05:30
parent d9796410bc
commit 51d936bc90
2 changed files with 19 additions and 8 deletions

2
.gitignore vendored
View File

@ -59,7 +59,7 @@ windows/enc_temp_folder/*
#CMake
src/cmake-build-debug/
src/.idea
src/.idea/
#Autotools

View File

@ -19,14 +19,25 @@ configure_file (
include_directories ("${PROJECT_SOURCE_DIR}")
include_directories ("${PROJECT_SOURCE_DIR}/lib_ccx")
include_directories ("${PROJECT_SOURCE_DIR}/utf8proc")
include_directories ("${PROJECT_SOURCE_DIR}/lib_ccx/")
include_directories ("${PROJECT_SOURCE_DIR}/utf8proc/")
include_directories ("${PROJECT_SOURCE_DIR}/gpacmp4/")
include_directories ("${PROJECT_SOURCE_DIR}/protobuf-c/")
include_directories ("${PROJECT_SOURCE_DIR}/zvbi")
aux_source_directory ("${PROJECT_SOURCE_DIR}/zvbi" SOURCEFILE)
aux_source_directory ("${PROJECT_SOURCE_DIR}/zlib" SOURCEFILE)
aux_source_directory ("${PROJECT_SOURCE_DIR}/lib_hash" SOURCEFILE)
include_directories ("${PROJECT_SOURCE_DIR}/zvbi/")
include_directories ("${PROJECT_SOURCE_DIR}/lib_hash/")
aux_source_directory ("${PROJECT_SOURCE_DIR}/protobuf-c/" SOURCEFILE)
aux_source_directory ("${PROJECT_SOURCE_DIR}/zvbi/" SOURCEFILE)
aux_source_directory ("${PROJECT_SOURCE_DIR}/lib_hash/" SOURCEFILE)
#Windows specific libraries and linker flags
if(WIN32)
include_directories ("${PROJECT_SOURCE_DIR}/win_iconv/")
include_directories ("${PROJECT_SOURCE_DIR}/libpng/")
aux_source_directory ("${PROJECT_SOURCE_DIR}/win_iconv/" SOURCEFILE)
aux_source_directory ("${PROJECT_SOURCE_DIR}/libpng/" SOURCEFILE)
set (EXTRA_LIBS ${EXTRA_LIBS} -lws2_32 -lwinmm)
endif(WIN32)
# Adding some platform specific library path
link_directories (/opt/local/lib)