Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Fix bitmapcode helper not building when it should be
[xestiaab/.git] / source / tools / CMakeLists.txt
index 8de8c5a..7a05fce 100644 (file)
@@ -1,16 +1,34 @@
 add_executable(bitmapcode
     bitmapcode.cpp)
-    
-add_custom_command(
-    TARGET bitmapcode
-    POST_BUILD
-    COMMAND ${CMAKE_BINARY_DIR}/tools/bitmapcode ${CMAKE_SOURCE_DIR}/bitmaps)
-    
-target_link_libraries(bitmapcode
-    LINK_PUBLIC
-    ${wxWidgets_LIBRARIES})
 
-add_executable(odthelpbrowser
+if (MSVC)
+    target_link_libraries(bitmapcode
+        LINK_PUBLIC
+        ${wxWidgets_LIBRARIES})
+    add_custom_command(
+        TARGET bitmapcode
+        POST_BUILD
+        COMMAND bitmapcode ${CMAKE_SOURCE_DIR}/bitmaps)
+elseif (APPLE)
+    target_link_libraries(bitmapcode
+        LINK_PUBLIC
+        c++
+        ${wxWidgets_LIBRARIES})
+    add_custom_command(
+        TARGET bitmapcode
+        POST_BUILD
+        COMMAND bitmapcode ${CMAKE_SOURCE_DIR}/bitmaps)
+else()
+    target_link_libraries(bitmapcode
+        LINK_PUBLIC
+        ${wxWidgets_LIBRARIES})
+    add_custom_command(
+        TARGET bitmapcode
+        POST_BUILD
+        COMMAND bitmapcode ${CMAKE_SOURCE_DIR}/bitmaps)
+endif()
+
+set (sources 
     odthelpbrowser/base64.cpp
     odthelpbrowser/base64.h
     odthelpbrowser/frmMain.cpp
@@ -21,8 +39,16 @@ add_executable(odthelpbrowser
     odthelpbrowser/ODTHelpBrowser.cpp
     odthelpbrowser/ODTHelpBrowser.h
     odthelpbrowser/version.h)
+
+if (WIN32)
+    add_executable(odthelpbrowser WIN32 ${sources})
+elseif (APPLE)
+    add_executable(odthelpbrowser MACOSX_BUNDLE ${sources})
+else()
+    add_executable(odthelpbrowser ${sources})
+endif()
     
 target_link_libraries(odthelpbrowser
     LINK_PUBLIC
     ${wxWidgets_LIBRARIES}
-    ${LIBXML2_LIBRARY})
\ No newline at end of file
+    ${LIBXML2_LIBRARY})
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