Fix the compilation of kiten on Windows
ClosedPublic

Authored by sdepiets on Oct 9 2018, 8:18 AM.

Details

Summary

This patch :

  • fixes the export behavior on Windows by using the cmake GenerateExportHeader feature
  • allows research and inclusion of mman.h/mman.lib
Test Plan

Tested on windows/neon

Diff Detail

Repository
R332 Kiten
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 3678
Build 3696: arc lint + arc unit
sdepiets created this revision.Oct 9 2018, 8:18 AM
Restricted Application added a project: KDE Edu. · View Herald TranscriptOct 9 2018, 8:19 AM
Restricted Application added a subscriber: kde-edu. · View Herald Transcript
sdepiets requested review of this revision.Oct 9 2018, 8:19 AM
sdepiets updated this revision to Diff 43197.Oct 9 2018, 8:27 AM

Remove unused header

sdepiets edited the summary of this revision. (Show Details)Oct 9 2018, 8:32 AM
sdepiets edited the test plan for this revision. (Show Details)
sdepiets added a reviewer: KDE Edu.
sdepiets added a project: Windows.
kfunk added a subscriber: kfunk.Oct 9 2018, 8:39 AM

ecm_mark_nongui_executable(kitengen) in CMake code has the same effect I think (and is the cleaner version)

CMakeLists.txt
41

Here and below: endif() is sufficient

42

Just:

message(STATUS "Found mman-win32 include: ${MMAN_INCLUDE_PATH}")
49

Dito, just on one line

lib/CMakeLists.txt
30

No need for repetition

if(WIN32)
  target_link_libraries(kiten ${MMAN_LIBRARY})
endif()

... below the platform agnostic target_link_libraries(...) works

kfunk requested changes to this revision.Oct 9 2018, 8:39 AM

Rest LGTM!

This revision now requires changes to proceed.Oct 9 2018, 8:39 AM
sdepiets updated this revision to Diff 43199.Oct 9 2018, 8:46 AM
sdepiets marked 4 inline comments as done.

Suggested improvements

sdepiets updated this revision to Diff 43200.Oct 9 2018, 8:51 AM

Improved non-gui win32 executable method

kfunk accepted this revision.Oct 9 2018, 8:54 AM

Feel free to push after fixing the last remark.

CMakeLists.txt
43 ↗(On Diff #43193)

Would rather do a target_include_directories(kiten PRIVATE ${MMAN_INCLUDE_PATH}) in e.g. line 28.

This part here should only *detect* MMAN.

This revision is now accepted and ready to land.Oct 9 2018, 8:54 AM
sdepiets updated this revision to Diff 43203.Oct 9 2018, 9:14 AM

Include only when needed

sdepiets closed this revision.Oct 9 2018, 9:17 AM
kfunk added a comment.Oct 9 2018, 9:18 AM

Thanks, perfect!