Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Migrate building on Windows to using CMake
[xestiaab/.git] / source / CMakeFunctions / Application.cmake
index ddf96a4..87a6208 100644 (file)
@@ -35,12 +35,19 @@ set(FILE_LIST main.cpp
               frmUpdate.h)
 
 if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
-    list(APPEND ${FILE_LIST} frmEditAccount.mm
+    list(APPEND FILE_LIST frmEditAccount.mm
                              frmNewAccount.mm)
 endif()
 
-add_executable(xestiaab
-    ${FILE_LIST})
+if (MSVC)
+    list(APPEND FILE_LIST os/msw/xestiaab.rc)
+    add_executable(xestiaab WIN32
+        ${FILE_LIST})
+else()
+    add_executable(xestiaab
+        ${FILE_LIST})
+endif()
+
 
 message("${RUNTIME_OUTPUT_NAME_bitmapcode}")
 
@@ -50,22 +57,33 @@ target_include_directories(xestiaab
     
 add_dependencies(xestiaab bitmapcode)
     
+list(APPEND LIBRARIES ${wxWidgets_LIBRARIES}
+                      ${LIBXML2_LIBRARY}
+                      sfml-audio
+                      CURL::libcurl
+                      actmgr
+                      carddav2
+                      common
+                      contacteditor
+                      export
+                      import
+                      misc
+                      search
+                      vcard
+                      widgets)
+
+if (MSVC)
+    list(APPEND LIBRARIES wsock32
+                          wininet
+                          security
+                          cryptui
+                          crypt32)
+endif()
+
 target_link_libraries(xestiaab
     LINK_PUBLIC
-    ${wxWidgets_LIBRARIES}
-    ${LIBXML2_LIBRARY}
-    sfml-audio
-    CURL::libcurl
-    actmgr
-    carddav2
-    common
-    contacteditor
-    export
-    import
-    misc
-    search
-    vcard
-    widgets)
+    ${LIBRARIES}
+)
 
 file(GLOB DOCUMENTATION_INSTALL_FILES "${CMAKE_SOURCE_DIR}/../docs/*")
 foreach(ITEM ${DOCUMENTATION_INSTALL_FILES})
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy